postaddictme / instagram-php-scraper

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

Endpoint ACCOUNT_MEDIAS is down? #195

Closed pedropamn closed 6 years ago

pedropamn commented 6 years ago

Hello

When i use the function Instagram::getMedias(), the script shows html characters from Instagram error page and the messages:

\src\InstagramScraper\Instagram.php</b> on line <b>91
Fatal error</b>:  Uncaught InstagramScraper\Exception\InstagramException: Response code is 404.

At line 91, shows error from line 89, Endpoints::getAccountMediasJsonLink. In Endpoints.php, this endpoint is the ACCOUNT_MEDIAS constant

const ACCOUNT_MEDIAS = 'https://www.instagram.com/{username}/media?max_id={max_id}'; But if you access this endpoints, the 404 error is shown by Instagram.

The API is down, right? Is there other way to get medias? Below, the print of error (in portuguese)

Thanks

image

raiym commented 6 years ago

https://github.com/postaddictme/instagram-php-scraper/blob/master/examples/getAccountMediasByUsername.php please see example

pedropamn commented 6 years ago

Same error ( Response code is 404). The Endpoint that this function use is down... I think that this is the problem. Is there a way around?

raiym commented 6 years ago

I will take a look when I get home later today

bebensiganteng commented 6 years ago

@raiym thank you very much!

fattony80 commented 6 years ago

@raiym looking forward to an update.

*Just found this - https://stackoverflow.com/questions/47169127/how-get-media-from-ig

sfatfarma commented 6 years ago

Hello,

@raiym Same issue here. I get the same 404 error. Thank you very much for looking into this. Really appreciate your work. :)

Regards, Szabi.

zaivst commented 6 years ago

The same problem. Yesterday all was ok, and today getMedias() get 404 error on any public account.

zaivst commented 6 years ago

https://www.instagram.com/anyuser/?__a=1 is works. now.... ))

waffle9012 commented 6 years ago

@zaivst how do I use that endpoint to get all media for a given username?

fattony80 commented 6 years ago

@raiym you're a champ, thanks.