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

getMedias() not working (404) #196

Closed waffle9012 closed 6 years ago

waffle9012 commented 6 years ago

For any account I try, getMedias() is returning a 404. These accounts definitely exist, maybe the IG endpoint has since changed or I have hit some anti-spam measure? I'm also using the latest version 0.8.0 but have tried in 0.7.2 and had the same issue.

Fatal error: Uncaught exception 'InstagramScraper\Exception\InstagramException' with message 'Response code is 404. Body: <!DOCTYPE html> <!--[if lt IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8 lt-ie7 not-logged-in "> <![endif]--> <!--[if IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8 not-logged-in "> <![endif]--> <!--[if IE 8]> <html lang="en" class="no-js lt-ie9 not-logged-in "> <![endif]--> <!--[if gt IE 8]><!--> <html lang="en" class="no-js not-logged-in "> <!--<![endif]--> <head><meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title> Page Not Found &bull; Instagram </title> <meta name="robots" content="noimageindex, noarchive"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#000000"> <meta id="viewport" name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1"> in

pedropamn commented 6 years ago

Apparently, this API is down by Instagram... I open an issue too. I hope there is another way to get medias

See my issue #195 for details about this

flexplex commented 6 years ago

The same issue. It seems like this api is down (

raiym commented 6 years ago

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

pedropamn commented 6 years ago

@raiym this example shows the same error:

Fatal error: Uncaught InstagramScraper\Exception\InstagramException: Response code is 404. Body: <!DOCTYPE html> <!--[if lt IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8 lt-ie7 not-logged-in "> <![endif]--> <!--[if IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8 not-logged-in "> <![endif]--> <!--[if IE 8]> <html lang="en" class="no-js lt-ie9 not-logged-in "> <![endif]--> <!--[if gt IE 8]><!--> <html lang="en" class="no-js not-logged-in "> <!--<![endif]--> <head><meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title> Page Not Found &bull; Instagram </title> <meta name="robots" content="noimageindex, noarchive"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#000000"> <meta id="viewport" name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1"> <link rel="manifes in C:\xampp\htdocs\Amazon\vendor\raiym\instagram-php-scraper\src\InstagramScraper\Instagram.php on line 91

zaivst commented 6 years ago

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

himberjack commented 6 years ago

looks like they removed it. I believe the https://www.instagram.com/graphql/query/?query_id=17888483320059182&variables=..... could be used instead