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

Intermittent Error "Response code is 200" #685

Closed Nicotroll closed 4 years ago

Nicotroll commented 4 years ago

Hi, since about 24 hours, all my scripts using this scraper are giving the error "Response code is 200" about once every 4 tries. I'm using residential rotating proxies, and even if I manully set my script to use one single proxy for testing, it will work about 3-4 times in a row, than throw this error, and if I try again 2 sec later with the same proxy it's gonna work again, so it's not because the proxies are banned. Anyone had this issue before ?

Here's the full error output: InstagramScraper\Exception\InstagramException: Response code is 200. Body: Something went wrong. Please report issue. in /home/Instagram-Scrapper/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php:385 Stack trace: #0 /var/www/vhosts/XXXXXX.com/httpdocs/test3.php(34): InstagramScraper\Instagram->getAccount() #1 {main}

psegovias commented 4 years ago

Which residential proxies are u using?

Nicotroll commented 4 years ago

Does it matter ?

iskrenpanteleev commented 4 years ago

Same problem here.

techybirds commented 4 years ago

same issue here

mnajafzadeh commented 4 years ago

Same issue.

abubakar-iqbal commented 4 years ago

any update?

eldark commented 4 years ago

Same issue using ProtonVPN and not the built-in proxy support.

SplendidGoT commented 4 years ago

Same issue here with or without proxy...

Gamblerio commented 4 years ago

Same issue here

roninit72 commented 4 years ago

Same issue there.

I have 2 web site for analyze IG stats, and starting from today no a single successfully request is done, no matter if I use proxies (like I always do) or not.

waiting for solution!

SplendidGoT commented 4 years ago

It has probably something to do with a change that broke the /?__a=1 jquery variant of Instagram pages. It still works within the browser but not if you try to get the contents of that page via curl or a simple file_get_contents(). It redirects you to the login page. So my guess it has something to do with cookies or sessions...

leonardooleg commented 4 years ago

Same issue.

amaelftah commented 4 years ago

here too

yazakha commented 4 years ago

the same issue ( any news?

asolopovas commented 4 years ago

screenshot-admin bloomsart fr-2020 06 02-21_48_56

roninit72 commented 4 years ago

Does anybody here use the instagram-php-scraper with phpAnalyzer - Social Media Analytics Statistics Tool from CodeCanyon like me?

roninit72 commented 4 years ago

+1

yazakha commented 4 years ago

it seems like it works only with login and password

roninit72 commented 4 years ago

Any news?

roninit72 commented 4 years ago

+1

artik commented 4 years ago

Same issue here, any news?

Fatal error: Uncaught InstagramScraper\Exception\InstagramException: Response code is 200. Body: <!DOCTYPE html> 
<html lang="en" class="no-js not-logged-in client-root touch">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title> Login • Instagram </title>
        <meta name="robots" content="noimageindex, noarchive">
        <meta name="apple-mobile-web-app-status-bar-style" content="default">
        <meta name="mobile-web-app-capable" content="yes">
        <meta name="theme-color" content="#ffffff">
        <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover">
        <link rel="manifest" href="/data/manifest.json">
        <link rel="preload" href="/static/bundles/es6/ConsumerUICommons.css/26b4bcda12c8.css" as="style" type="text/css" crossorigin="anonymous" />
        <link rel="preload" href="/static/bundles/es6/ConsumerAsyncCommons.css/638f1bd337c8.css"

as="style in /var/www/html/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php on line 431
wawezz commented 4 years ago

Same problem, any news ?

roninit72 commented 4 years ago

No-one able to solve this issue?

Is there a possible solution, or this script is dead?

roninit72 commented 4 years ago

Hello?! Is there anybody out there? (cit. Pink Floyd)

land0r commented 4 years ago

Same issue

pckz commented 4 years ago

Same issue :( In local works fine, but in server does not work

asolopovas commented 4 years ago

instagtam redirecting some IP's to login page, and rather than getting profile page you get another one.

⁣Sent from Blue ​

On 11 Jun 2020, 04:06, at 04:06, Xavier Ojeda notifications@github.com wrote:

Same issue :( In local works fine, but in server does not work

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/postaddictme/instagram-php-scraper/issues/685#issuecomment-642377927

rugualter commented 4 years ago

n May 2020, Instagram significantly upgraded their anti-scraping protection, banning most datacenter proxies worldwide. Many of the previously working solutions were completely blocked by redirecting the pages into login wall. Currently, the only reliable solution to this problem is to use residential proxies. Datacenter proxies may still work but likely in less than 10% of cases.

Tested in various servers and it seems o be a general problem, in localhost it works perfectly, but in server environments doesn't work at all, even with proxies, the majority of them are getting the wrong response from the cURL @raiym you should change the scraping url because Instagram is redirecting the requests to the login page, so the scraper is scraping the login page and not the user page, maybe try to change the user agent or the mobile url. or maybe if the cUrl gets the wrong scrap try to make the try again until you get the page. In theory your scrapper is working just in local environment, because Instagram recognize that the call is local.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.