instaloader icon indicating copy to clipboard operation
instaloader copied to clipboard

400 Bad Request - aborted pulling info URL

Open m-theredhead opened this issue 2 years ago • 8 comments

Starting over the weekend, Instaloader has begin giving an error. Prior to that, no error was being generated and initial downloads were all completed succesfully.

The command line I am running is:

/usr/local/bin/instaloader --latest-stamps .stamps/.stamp --login <my_user> --no-metadata-json --no-captions --stories --no-video-thumbnails --abort-on=302,400,429 ''

Here is what I am seeing:

Using latest stamps from .stamps/<profile>.stamp.
Loaded session from /home/<user>/.config/instaloader/session-<user>.
Logged in as <user>.
Traceback (most recent call last):
  File "/usr/local/bin/instaloader", line 33, in <module>
    sys.exit(load_entry_point('instaloader==4.9.1', 'console_scripts', 'instaloader')())
  File "/usr/local/lib/python3.10/site-packages/instaloader/__main__.py", line 471, in main
    _main(loader,
  File "/usr/local/lib/python3.10/site-packages/instaloader/__main__.py", line 212, in _main
    }.get(target[0], 'username')
IndexError: string index out of range

If I run it with --quiet, I get a different error:

Download aborted: Query to https://i.instagram.com/api/v1/media/<profile_ID>/info/ responded with "400 Bad Request".

It appears to be doing this for all of the profiles I am downloading ( ~6 ).

I am getting some of the images and stories images/videos, but it doesn't look like I am necessarily getting them all.

Instaloader version: 4.9.1

Any suggestions or is anything else seeing something like this?

m-theredhead avatar Jun 27 '22 22:06 m-theredhead

similar thing happens to me

w1kee avatar Jun 28 '22 18:06 w1kee

As quickly as this issue came on, it has also left. I am assuming the change or issue was on the Instagram side. I will leave this open for a few more days and then close

m-theredhead avatar Jul 01 '22 03:07 m-theredhead

This issue is back again today and it definitely is leading to missed stories. Is there any other information that might help debug this?

m-theredhead avatar Jul 08 '22 16:07 m-theredhead

Since yesterday evening this is happening on all my accounts (6) when downloading stories. After 1 or 2 downloads the error400 occurs. (The account is not locked) I tried scraping only 1 account for stories but when downloading the second file (of 2) the error 400 occurred again.

denbartman avatar Jul 15 '22 10:07 denbartman

yeah this is happening to me too lately, any way to fix it????

afterdelight avatar Jul 18 '22 21:07 afterdelight

I was having this same issue. When I tried to log in manually I was asked to change my password because of my unusual activity, Instagram determined that my account was compromised. After I changed my password, everything started working again, but now I get an HTTP 429 Too Many Requests.

mavilar avatar Jul 21 '22 09:07 mavilar

This issue persists for me. I am running instaloader across ~10 profiles and I usually only get this error on a couple of accounts. For those accounts, I seem to be getting the normal posetd pictures, but not all the stories

m-theredhead avatar Jul 25 '22 23:07 m-theredhead

Warning: If error 400 occurs and you continue using your account with instaloader or any scraper this will lead to suspension of your account. My account got suspended today. I was downloading my saved posts but Instagram randomly gave error 400 and then when I logged into my account in the Instagram app I found that my account is suspended. So please continue scraping with fake or temporary Instagram account.

angentanewbe avatar Jul 29 '22 18:07 angentanewbe

Description too vague / unclear to track it purposefully as a bug. The first problem is not reproducible, for the 400 Bad Request response we already have a bug ticket.

aandergr avatar Aug 11 '22 18:08 aandergr

remove --abort-on=400 command should fix this

afterdelight avatar Aug 13 '22 13:08 afterdelight