Skip to content

Commit

Permalink
Merge pull request #426 from bernhard-efler/master
Browse files Browse the repository at this point in the history
fix login - add cookie banner cookie
  • Loading branch information
raiym authored Nov 26, 2018
2 parents d9621d2 + bd7b955 commit 77efeaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/InstagramScraper/Instagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ public function login($force = false, $support_two_step_verification = false)
endif;
$mid = $cookies['mid'];
$headers = [
'cookie' => "csrftoken=$csrfToken; mid=$mid;",
'cookie' => "ig_cb=1; csrftoken=$csrfToken; mid=$mid;",
'referer' => Endpoints::BASE_URL . '/',
'x-csrftoken' => $csrfToken,
'X-CSRFToken' => $csrfToken,
Expand Down Expand Up @@ -1331,7 +1331,7 @@ public function isLoggedIn($session)
$sessionId = $session['sessionid'];
$csrfToken = $session['csrftoken'];
$headers = [
'cookie' => "csrftoken=$csrfToken; sessionid=$sessionId;",
'cookie' => "ig_cb=1; csrftoken=$csrfToken; sessionid=$sessionId;",
'referer' => Endpoints::BASE_URL . '/',
'x-csrftoken' => $csrfToken,
'X-CSRFToken' => $csrfToken,
Expand Down

0 comments on commit 77efeaf

Please sign in to comment.