instaloader: Instagram 560 errors when trying to download stories from lots of accounts
Describe the bug I’m receiving 560 errors when downloading multiple stories at the same time. This is happening on multiple accounts, not just one.
To Reproduce
Using stories.cmd batch:
instaloader +args.txt --no-posts --no-profile-pic --stories --no-metadata-json --no-iphone --abort-on=400,429
Inside the args text:
--login="<IG username>" --password="<IG user password>" --fast-update <Accounts to fetch stories from>
Expected behavior Should be downloading stories. If I download stories from only one account or a few, then the stories download should work, if the user has any active stories. But…
Error messages and tracebacks When I try to download stories from lots of accounts at the same time, Instagram is sending out 560 error code instead:
JSON Query to graphql/query: HTTP error code 560. [retrying; skip with ^C]
Errors or warnings occurred: Download stories: JSON Query to graphql/query: HTTP error code 560.
Instaloader version 4.9.2
Additional context This is happening starting just today. Is it just me or are others facing the same issue? If so, are Instagram servers overloaded for some reason?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 30 (4 by maintainers)
You can simply modify this line:
https://github.com/instaloader/instaloader/blob/5e232fd4f521b1700c122827d973fd868c6ae483/instaloader/instaloader.py#L793
to a smaller number instead of running the accounts one by one manually.
5 works for me at the moment, but you can try literally 1.
Also yeah, I still encounter 560 issue today if using default 50 to download 23 account at once.
That does not avoid error 400. It only allows access to metadata. And it is worth everything, I mean the following:
Greetings.
sorry, this is not happening for me (germany). No clue why this happens for you though
This is a good catch! For some reason my web version of instagram does not use this endpoint but it seems to work if we substitute the lines 767-771 in structures.py (again) with the following:
I’ll try this version out for a few days on my fork of instaloader and will report back.
I’m having the problem of frequent 560 errors too (see #1616) so I was trying to find the root cause of the problem.
When I’m browsing through the network requests on instagram I can see a request I have never seen before. Maybe it is new? It’s going to this endpoint:
https://i.instagram.com/api/v1/web/get_ruling_for_content/?content_type=PROFILE&target_id=xwhere
target_idis the id of the profile I opened in the browser. The request is directly before the one fetching the new profile information from:https://i.instagram.com/api/v1/users/web_profile_info/?username=x_usernameThe response is just
{"title":"","description":"","status":"ok"}so nothing special in there…Did someone see this type of request before? Maybe it sets some cookie we need for fetching user profiles now or anything like that?
this error 400 is another problem, see #1633. Please see there and do not spam this issue.
These 560 errors are downright annoying. Even going one-by-one I occasionally get 560 errors, particularly from those who have a lot of stories in the backlog. Ugh. And that’s not before I get tired of having to wait significantly longer because I have to ‘re-login’ before checking each target account one-by-one - and risking the Instagram ‘bot cops’ that can occasionally lock my accounts down!
I just hope Instagram fixes this 560 error nonsense.
(Off-topic: It’s also been over a month and a half that Instagram broke the Oh My IG chrome extension and having to go through Instagram’s dreaded ‘algorithm’ timeline. I hope there’s an alternative to this extension with the revised API soon ™.)
EDIT: Now I have not one - but TWO - accounts temporarily banned from accessing Instagram over the past week, one today. Redirected to login error, but they’re asking me for my phone number, only for Instagram to NOT send the SMS with the required verification code. Ugh. I’ve dealt with this multiple times already this year. Really angry at Instagram - and META.
(And I also got the 429 too many requests error as well.)
Now I have to wait for at least a week for these accounts to get ‘unbanned’ without trying to repeatedly send the phone number to send an SMS for verification code only to repeatedly fail. It seems Instagram doesn’t really care about us.
Sorry for the rant. I’m just tired with Instagram changing up API (at the beginning of June), 560 errors (this week), etc. They don’t really like us extracting stuff from there automatically, having to do this manually is going to be a time waster without Instaloader.
I’m really, really concerned about this situation. If Instagram doesn’t fix this 560 error nonsense I’m fearing that they could be doing all they can to intentionally try to screw Instaloader - and us users - up.
For now I’m going to have to suspend fetching IG stories for now, at least a week. Again, hopefully, hopefully Instagram fixes the 560 error for fetching stories while I’m taking a break. I’m simply too tired to fight with this. It was almost a month and a half it was running smooth scraping stories, but this week’s 560 error nonsense have first made fetching stories longer - and now two of my accounts are temporarily banned from using Instagram for scraping too much, not allowing me to get the recovery code SNS before Instagram unlocks these accounts by itself. At least I’m still able to fetch regular posts normally (if not impeded by account lock).
(I have over 500 accounts to check, which is a lot. More than someone here who said earlier that he was trying to scrape over 400 accounts. Mostly Japanese stuff.)
Day 2 of 560 error issues. Still being triggered. Trying to do the workaround https://github.com/instaloader/instaloader/issues/1599#issuecomment-1165459346 but it doesn’t work all the time. I hope Instagram resolves this error soon ™.
Also how do I find out which account(s) is/are triggering the 560 error(s)?
error 5xx are server side problems. I can confirm the error 560 thing today in the morning, but also some minutes ago. Sometimes the download is successful even the error message is returned, sometimes nothing is downloaded. We should wait until tomorrow and see if the problem persists. I observed similar things in the last time and all went away the following days.