Skip to content

Commit

Permalink
Merge pull request #84 from dzen898/master
Browse files Browse the repository at this point in the history
String input param support on parseCookies()
  • Loading branch information
raiym authored Mar 23, 2017
2 parents 0d14323 + 6839673 commit b1ae4f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/InstagramScraper/Instagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ public function getMediaCommentsByCode($code, $count = 10, $maxId = null)

private static function parseCookies($rawCookies)
{
if(!is_array($rawCookies)){
$rawCookies = [$rawCookies];
}

$cookies = [];
foreach ($rawCookies as $c) {
$c = explode(';', $c)[0];
Expand Down Expand Up @@ -558,4 +562,4 @@ public function saveSession()
$cachedString = self::$instanceCache->getItem($this->sessionUsername);
$cachedString->set($this->userSession);
}
}
}

0 comments on commit b1ae4f9

Please sign in to comment.