Gallery-dl: Instagram locked my account

Created on 13 Nov 2020  路  13Comments  路  Source: mikf/gallery-dl

Hey,

So I wanted to download one user gallery with gallery-dl it all went fine for few minutes until I noticed it had stopped well I though it had downloaded all the images but upon checking my phone the reason appeared to be that instagram locked my account because they thought someone is trying to access it. Glad I was able to recover my account with just changing password and not needing to prove anything else.

But ya basically I had imported my instagram cookies to gallery-dl because instagram doesn't allow guest view anymore I guess?? then used gallery-dl to download few images which caused my account temporary locked up.

Most helpful comment

It was happening to me often, I avoided it by adding a --sleep 10 and not running gallery-dl everyday, I run it every other day, also use "skip": "abort:3" on my config file to avoid making many requests.

Went from being locked time I ran it, to using it securely for about a month now without ever getting locked.

All 13 comments

Did you access IG simultaneously from two devices/locations etc. (i.e. from different IP addresses)?

Not sure if it counts that I was logged in from my phone but didn't use it while using gallery-dl from pc with vpn on. Tho I had earlier logged in at pc from browser to get the cookie with vpn IP. I did get alert from IG that new login from different ip address but nothing major after that.

instagram is implementing bot detectors, if it detects you are doing to many automated requests, it will lock your account

( I am using anonymous access, IG is locking my IP for unauthenticated acess only )

It was happening to me often, I avoided it by adding a --sleep 10 and not running gallery-dl everyday, I run it every other day, also use "skip": "abort:3" on my config file to avoid making many requests.

Went from being locked time I ran it, to using it securely for about a month now without ever getting locked.

The sleep-request option should also be helpful to slow things down a notch

@mikf I added sleep-request with 2seconds, still no joy, account locked,

maybe we need to reverse engineer what the webapp does to avoid this

@hellupline I've tested with 5 seconds and even that wasn't enough. Maybe 10 seconds for
both sleep and sleep-request helps (https://github.com/mikf/gallery-dl/issues/1113#issuecomment-730494489), but there is most likely also something else causing this block by Instagram.

After getting blocked while trying with 5 second delay, I was also immediately blocked in a regular browser with different user agent, default headers, etc, but it worked as normal on a Windows 10 machine on the same network (i.e. same external IP)

I've tested much longer delays and it still doesn't help.

One can just use proxy but I think the real issue here is there is no resume option. Download archive saves numeric file IDs instead of alphanumeric ones of pages (https://www.instagram.com/p/XXXXXXXXX). So instead of instantly resuming with new IP from n-th page gallery-dl starts hammering Instragram from page one all over again... and then you get banned without even reaching not yet downloaded images.

Or am I using gallery-dl wrong?

@mikf Any ideas? How can I force gallery-dl to start downloading from n-th image on Instagram?

@reallyuniquename gallery-dl --range 123- to start downloading from the 123th image and forward.

@kattjevfel Have you actually tried it with Instagram? Run it with -v --range 123-, gallery-dl still queries every /p/XXXXXXXXX page before reaching 123th image and rate-limiting hits you way before that. The only difference is it doesn't pull actual JPG files.

I haven't tried it with instagram, no. Thought since it worked with other extractors it'd work the same here.

Should be fixed with https://github.com/mikf/gallery-dl/commit/447488fb1876f507a6409be12864e9f22cac83e6 (See https://github.com/mikf/gallery-dl/issues/1149#issuecomment-738001532)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

colpocleisis picture colpocleisis  路  3Comments

biznizz picture biznizz  路  4Comments

thisisamericalolxdmdrrrrddds picture thisisamericalolxdmdrrrrddds  路  6Comments

kattjevfel picture kattjevfel  路  5Comments

kattjevfel picture kattjevfel  路  6Comments