mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
12.09k stars 982 forks source link

[Instagram] Random errors #1188

Closed rEnr3n closed 3 years ago

rEnr3n commented 3 years ago
$ gallery-dl --version
1.16.0

I'm gettings this error sometimes when downloading instagram profiles. [instagram][error] Redirected to login page (https://www.instagram.com/accounts/login/?next=/jiyeon_lovelyhan/)

This looks like the same issue I experienced before with https://github.com/mikf/gallery-dl/issues/1012 except it's more frequent. I don't use account for downloading. I can't replicate this issue reliably. It seems like an issue on instagram's side.

I'll post a debug log when I catch it.

hellupline commented 3 years ago

its instagram anti-crawer measures, they blocked your IP for anonymous access

the fix was to reduce the number of requests to instagram endpoint, reducing the chance for you to get banned

instagram still blocks crawlers if they detect it ( and trust me, they are good at it)

rEnr3n commented 3 years ago

Weird. One week after @hellupline's post I have never seen this error once (I download from several accounts daily). I never changed anything network-related. Should I just close this?

ghost commented 3 years ago

[gallery-dl][debug] Version 1.14.5 [gallery-dl][debug] Python 3.8.5 - Windows-10-10.0.19041 [gallery-dl][debug] requests 2.24.0 - urllib3 1.25.10 [gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/princessa_jaq' [instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/princessa_jaq' [urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443 [urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /princessa_jaq/ HTTP/1.1" 302 0 [urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /accounts/login/?next=/princessa_jaq/ HTTP/1.1" 200 12894 [instagram][error] An unexpected error occurred: KeyError - 'ProfilePage'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues . [instagram][debug] Traceback (most recent call last): File "gallery_dl\job.py", line 64, in run File "gallery_dl\extractor\instagram.py", line 44, in items File "gallery_dl\extractor\instagram.py", line 301, in _extract_page KeyError: 'ProfilePage'

is this the same issue? is there any workaround? I haven't used gallery-dl for a while so I doubt it's my ip

iamleot commented 3 years ago

Hello Horus,

Horus Ra writes:

`[gallery-dl][debug] Version 1.14.5

That's probably the problem: version 1.14.5, please update to latest stable version and that should be fixed.