mikf / gallery-dl

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

Can't download INSTAGRAM Profile Pic #6265

Open harshbhardwaj77 opened 6 days ago

harshbhardwaj77 commented 6 days ago

I am unable to download Instagram profile pictures. This is the error im getting -

gallery-dl --cookies-from-browser firefox --verbose --download-archive '/Archives/!john Benjamin.txt https://www.instagram.com/john.benjamin [gallery-dl][debug] Version 1.27.4 [gallery-dl][debug] Python 3.11.5 - Windows-10-10.0.22621-SP0 [gallery-dl][debug] requests 2.32.3 - urllib3 2.2.2 [gallery-dl][debug] Configuration Files ['%APPDATA%\gallery-dl\config.json'] [gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/john.benjamin' [instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/john.benjamin' [instagram][debug] Using InstagramAvatarExtractor for 'https://www.instagram.com/john.benjamin/avatar/' [cookies][debug] Extracting cookies from C:\Users\XX\AppData\Roaming\Mozilla\Firefox\Profiles\g2stntyk.default-release\cookies.sqlite [cookies][debug] Only loading cookies not belonging to any container [cookies][info] Extracted 157 cookies from Firefox [urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443 [urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /api/v1/users/web_profile_info/?username=john.benjamin HTTP/11" 200 37692 [instagram][debug] Sleeping 11.75 seconds (request) [urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /api/v1/users/45206110906/info/ HTTP/11" 200 410 [instagram][error] An unexpected error occurred: KeyError - 'hd_profile_pic_versions'. 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 "C:\Users\XX\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\job.py", line 151, in run for msg in extractor: File "C:\Users\XX\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\extractor\instagram.py", line 67, in items posts = self.posts() ^^^^^^^^^^^^ File "C:\Users\XX\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\extractor\instagram.py", line 643, in posts user["hd_profile_pic_versions"][-1])


KeyError: 'hd_profile_pic_versions'
[instagram][debug] Using InstagramPostsExtractor for 'https://www.instagram.com/john.benjamin/posts/'
[instagram][debug] Using cached cookies from ('firefox', '', '', '', '')
[instagram][debug] Sleeping 11.08 seconds (request)
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /api/v1/feed/user/45206110906/?count=30 HTTP/11" 200 110545
mikf commented 2 days ago
$ gallery-dl --cookies cookies-instagram-com.txt --verbose https://www.instagram.com/john.benjamin
[gallery-dl][debug] Version 1.27.6-dev - Git HEAD: a9671f16
[gallery-dl][debug] Python 3.12.6 - Linux-6.10.10-arch1-1-x86_64-with-glibc2.40
[gallery-dl][debug] requests 2.31.0 - urllib3 2.1.0
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/john.benjamin'
[instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/john.benjamin'
[instagram][debug] Using InstagramAvatarExtractor for 'https://www.instagram.com/john.benjamin/avatar/'
[instagram][debug] Loading cookies from 'cookies-instagram-com.txt'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /api/v1/users/web_profile_info/?username=john.benjamin HTTP/1.1" 302 0
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /api/v1/users/web_profile_info/?username=john.benjamin HTTP/1.1" 200 1057
[instagram][debug] Sleeping 11.44 seconds (request)
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /api/v1/users/1465527031/info/ HTTP/1.1" 200 2364
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): scontent-lga3-2.cdninstagram.com:443
[urllib3.connectionpool][debug] https://scontent-lga3-2.cdninstagram.com:443 "GET /v/t51.2885-19/44884218_345707102882519_2446069589734326272_n.jpg?stp=dst-jpg_e0_s150x150&_nc_ht=scontent-lga3-2.cdninstagram.com&_nc_cat=1&_nc_ohc=xbc9DNsDBzwQ7kNvgEUl4CX&_nc_gid=6655884539b84eb49e0aade5a5c700a2&edm=AD93TDoBAAAA&ccb=7-5&ig_cache_key=YW5vbnltb3VzX3Byb2ZpbGVfcGlj.3-ccb7-5&oh=00_AYA3YrywfC88KldpE5MokLRbwMtLbsY0ChpXqmbPkHm6LA&oe=6708198F&_nc_sid=87e5dd HTTP/1.1" 200 1718
./instagram/john.benjamin/avatar:1465527031.jpg