postaddictme / instagram-php-scraper

Get account information, photos, videos, stories and comments.
https://packagist.org/packages/raiym/instagram-php-scraper
MIT License
3.1k stars 800 forks source link

getMediasByLocationId seem not working #1053

Open arpunpun opened 2 years ago

arpunpun commented 2 years ago

Code $medias = $instagram->getMediasByLocationId('105938891315826', 10);

Response null

I found 'InstagramScraper/Instagram.php' LINE 174 $arr['graphql'] is empty

Printout https://imgur.com/a/7QSQtCh

kiprasbiel commented 2 years ago

Same issue with Instagram::getLocationById.

Seems that Endpoints::getMediasJsonByLocationIdLink method now return json with new structure in which instead of graphql, _native_locationdata is populated with data.

Managed to fix getLocationById, by simply passing new structure (pull request #1059) , but getMediasByLocationId has a lot more changes that I'm not familiar with.