Skip to content

Commit

Permalink
Fix scraping markup rules based on Instagram changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmcdade committed Apr 6, 2015
1 parent 7b97665 commit 4f8afdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _add-ons/instagrizzle/tasks.instagrizzle.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public function scrape($username)
{
$source = file_get_contents('http://instagram.com/' . $username);
$shards = explode('window._sharedData = ', $source);
$json_response = explode('"}};', $shards[1]);
$response_array = json_decode($json_response[0].'"}}', TRUE);
$json_response = explode(';</script>', $shards[1]);
$response_array = json_decode($json_response[0], TRUE);

$media = $response_array['entry_data']['UserProfile'][0]['userMedia'];

Expand Down

0 comments on commit 4f8afdc

Please sign in to comment.