Skip to content

Commit

Permalink
Merge pull request #524 from benlumley/master
Browse files Browse the repository at this point in the history
Quick fix to get media loading again
  • Loading branch information
raiym authored Aug 14, 2019
2 parents ba9d8a9 + cbbd7ac commit 89ab407
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/InstagramScraper/Instagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ private function generateHeaders($session, $gisToken = null)
$headers['x-instagram-gis'] = $gisToken;
}
}

if (empty($headers['x-csrftoken'])) {
$headers['x-csrftoken'] = md5(uniqid()); // this can be whatever, insta doesn't like an empty value
}

return $headers;
}
Expand Down

0 comments on commit 89ab407

Please sign in to comment.