mikf / gallery-dl

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

Instagram - An unexpected error occurred: KeyError - 'ProfilePage' #2155

Closed dl21g5 closed 2 years ago

dl21g5 commented 2 years ago

Instagram download is down.

gallery-dl -u dlghyu125@gmail.com -p password1 https://www.instagram.com/username1

[gallery-dl][debug] Version 1.20.0
[gallery-dl][debug] Python 3.8.9 - Windows-10-10.0.19041-SP0
[gallery-dl][debug] requests 2.26.0 - urllib3 1.26.7
[gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/username1/?hl=en'
[instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/username1/?hl=en'
[instagram][debug] Using InstagramPostsExtractor for 'https://www.instagram.com/username1/posts/'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /username1/ HTTP/1.1" 302 0
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /challenge/?next=/username1/ HTTP/1.1" 200 24837
[instagram][error] An unexpected error occurred: KeyError - 'ProfilePage'. Please run gallery-dl again with the --verbos
e flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[instagram][debug]
Traceback (most recent call last):
  File "C:\msys64\mingw64\lib\python3.8\site-packages\gallery_dl\job.py", line 79, in run
    for msg in extractor:
  File "C:\msys64\mingw64\lib\python3.8\site-packages\gallery_dl\extractor\instagram.py", line 48, in items
    for post in self.posts():
  File "C:\msys64\mingw64\lib\python3.8\site-packages\gallery_dl\extractor\instagram.py", line 433, in posts
    user = self._extract_profile_page(url)
  File "C:\msys64\mingw64\lib\python3.8\site-packages\gallery_dl\extractor\instagram.py", line 350, in _extract_profile_
page
    return data["ProfilePage"][0]["graphql"]["user"]
KeyError: 'ProfilePage'
AlttiRi commented 2 years ago

https://github.com/mikf/gallery-dl/issues?q=ProfilePage

https://github.com/mikf/gallery-dl/issues/758

dl21g5 commented 2 years ago

https://github.com/mikf/gallery-dl/issues?q=ProfilePage

758

I tried running gallery-dl --clear-cache instagram. Still same issue

dl21g5 commented 2 years ago

Turns out my instagram account was being redirected to Add a phone number page.