The error#
Redirected to login pageRaised when the Instagram response URL starts with https://www.instagram.com/accounts/login/. A non-200 that is not that redirect raises:
Got status code {status_code}A private account does not raise. The scraper logs Private account and returns. A missing page logs Page does not exist and returns. Neither of those is an exception.
What triggers it#
_initial_page or _check_json_callback saw the login URL. This module fetches the old window._sharedData script. If that script is missing, the split can raise IndexError instead of ScraperException. The source comment says that IndexError is left to bubble when Instagram changes the page.
How to confirm#
The text is exactly Redirected to login page. Private account in the log with an empty result is the private branch, not this exception. Got status code is a non-200 that stayed off the login URL.
Fixes#
This Instagram module has no login argument. A redirect to /accounts/login/ is the end of the anonymous request. There is no cookie loader in this file. The shared-data parser is also tied to a page shape Instagram has since replaced. An IndexError on window._sharedData is that drift, not a rate limit.
SocialScrape#
Instagram profile is GET /v1/instagram/profile. A private account comes back with is_private true. Posts are GET /v1/instagram/profile/posts, and one post is GET /v1/instagram/post.
Failed requests cost 0 credits. New accounts get 100 credits on signup, no card. Codes are on errors.