postaddictme / instagram-php-scraper

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

getAccount() and getPaginateMedias() doesn't work anymore. #1067

Open TheSimpleCoder opened 2 years ago

TheSimpleCoder commented 2 years ago

getAccount() and getPaginateMedias() doesn't work anymore. Need fix.

adrianosmateus commented 2 years ago

Same thing here, cant fetch accounts or media.

adrianosmateus commented 2 years ago

I changed the user-agent at src/InstagramScraper/Instagram.php:56 to private $userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/603.1.23 (KHTML, like Gecko) Version/10.0 Mobile/14E5239e Safari/602.1'; and it worked again.

sinagolchiin commented 2 years ago

This did not work for me. I think Instagram used a cookie to block requests. https://www.instagram.com/kevin/?__a=1 This request shows the following error in Chrome and Firefox browsers for (;;); {"__ ar": 1, "error": 1357004, "errorSummary": "Sorry, something went wrong", "errorDescription": "Please try closing and re-opening your browser window.", " payload ": null," hsrp ": {" hblp ": {" consistency ": {" rev ": 1005620371}}}," lid ":" 7104639836351252026 "} but it works for two times in edge browser

Does anyone have a safe way to get posts on public Instagram pages?

naearu commented 2 years ago

I'm having the same problem.

    [message:protected] => Response code is 200: OK.Something went wrong. Please report issue.
    [string:Exception:private] => 
    [code:protected] => 200
    [file:protected] => /vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php
    [line:protected] => 744
Francois-Francois commented 2 years ago

Looks like the _sharedData object is not available anymore :/

tayfunyasar commented 2 years ago

what will all crawlers do? :'(

nathnat commented 2 years ago

same issue here

im-api commented 2 years ago

Looks like the _sharedData object is not available anymore :/

I agree too

pierregouret commented 2 years ago

Same Issue :cry: I login with basic credentials and I tested some function :

Anyone has any idea whats the bug ?

Regards

safaksaylam commented 2 years ago

Same issue, browser private apis not working now.

iankaufmann commented 2 years ago

Same Issue 😢 I login with basic credentials and I tested some function :

* searchAccountsByUsername -> works

* getAccount -> doesn't work

* getAccountById -> doesn't work

* getMedias -> doesn't work

* getAccountInfo -> doesn't work

Anyone has any idea whats the bug ?

Regards

Instagram changed their frontend and got rid of everything that we need to make this work.

This repo (which is python) appears to have it working, with the mods listed in this issue/comment: https://github.com/arc298/instagram-scraper/issues/805#issuecomment-1147981554

I was able to do a scrape via the command line with this updated tool. (Although my IP got rate-limited by Instagram fairly quickly)

I assume it's just going to take some time for all the different scrapers out there to adapt to the updated Instagram UI.

Denitz commented 2 years ago

Yes, the _sharedData object has gone and getAccount() stopped working.

farizaiis commented 2 years ago

is there a solution for this without using python?

Vivatec commented 2 years ago

Didn't find any solution to the problem?

Francois-Francois commented 2 years ago

There is no solution afaik. This package has to be archived or rewrite entirely

sagitaire123 commented 2 years ago

@rikless any other working library that you can recommend please ?

Francois-Francois commented 2 years ago

no :/

pepea28 commented 2 years ago

@rikless any other working library that you can recommend please ?

I use https://github.com/pgrimaud/instagram-user-feed and it works for retrieving posts.

SrMordred commented 2 years ago

I use https://github.com/pgrimaud/instagram-user-feed and it works for retrieving posts.

Well, i came here from this one because its stop working for me ;/

Francois-Francois commented 2 years ago

@rikless any other working library that you can recommend please ?

I use https://github.com/pgrimaud/instagram-user-feed and it works for retrieving posts.

Thanks, it works like a charm !

lwiml commented 2 years ago

https://github.com/postaddictme/instagram-php-scraper/pull/1086

skmachine commented 2 years ago

the APIs https://rapidapi.com/neotank/api/instagram130/ still works fine.. weird