-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instagram 'Redirected to login page' error #165
Comments
That means that your IP has been semi-banned. Instagram has ridiculous rate limits for anonymous users on profile pages to the point that you can easily trigger them with a few clicks on profile links. They also ban all IP ranges from major server providers. To my knowledge, the only way around it is logging in, but I have no intentions of adding any sort of login to snscrape (cf. #23 and #50). |
I now seem to be getting this instead:
|
Confirmed, triggered it after a while, it's a redirect to the login page. The above commit now detects this and raises an exception as in the first comment instead of this obscure generic error. |
For snscrape --max-results 50 instagram-user "user":
2020-12-08 10:58:55.184 CRITICAL snscrape._cli Dumped stack and locals to /tmp/snscrape_locals_q6gn6xra
Traceback (most recent call last):
File "/usr/local/bin/snscrape", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/snscrape/_cli.py", line 270, in main
for i, item in enumerate(scraper.get_items(), start = 1):
File "/usr/local/lib/python3.8/site-packages/snscrape/modules/instagram.py", line 137, in get_items
r = self._initial_page()
File "/usr/local/lib/python3.8/site-packages/snscrape/modules/instagram.py", line 111, in _initial_page
raise snscrape.base.ScraperException('Redirected to login page')
snscrape.base.ScraperException: Redirected to login page
The text was updated successfully, but these errors were encountered: