Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[instagram] highlights download error #479

Closed
EveKaczmarek opened this issue Nov 19, 2019 · 6 comments
Closed

[instagram] highlights download error #479

EveKaczmarek opened this issue Nov 19, 2019 · 6 comments
Labels

Comments

@EveKaczmarek
Copy link

$ gallery-dl -u username -p password -o extractor.instagram.highlights=true --verbose https://www.instagram.com/katsumicos
[gallery-dl][debug] Version 1.11.1
[gallery-dl][debug] Python 3.8.0 - Linux-5.3.11-3-clear-x86_64-with-glibc2.2.5
[gallery-dl][debug] requests 2.22.0 - urllib3 1.25.7
[gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/katsumicos'
[gallery-dl][debug] Updating urllib3 ciphers
[instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/katsumicos'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /katsumicos/ HTTP/1.1" 200 21912
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /graphql/query/?query_hash=aec5501414615eca36a9acf075655b1e&variables=%7B%22user_id%22:%225666744720%22,%22include_chaining%22:true,%22include_reel%22:true,%22include_suggested_users%22:false,%22include_logged_out_extras%22:false,%22include_highlight_reels%22:true%7D HTTP/1.1" 200 9340
[instagram][debug] Using InstagramStoriesExtractor for 'https://www.instagram.com/stories/highlights/17902040392378752/'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /graphql/query/?query_hash=30a89afdd826d78a5376008a7b81c205&variables=%7B%22reel_ids%22:%5B%5D,%22tag_names%22:%5B%5D,%22location_ids%22:%5B%5D,%22highlight_reel_ids%22:%5B%2217902040392378752%22%5D,%22precomposed_overlay%22:true,%22show_story_viewer_list%22:true,%22story_viewer_fetch_count%22:50,%22story_viewer_cursor%22:%22%22,%22stories_video_dash_manifest%22:false%7D HTTP/1.1" 200 1436
[instagram][error] An unexpected error occurred: KeyError - 'video_url'. 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 "/usr/lib/python3.8/site-packages/gallery_dl/job.py", line 48, in run
    for msg in self.extractor:
  File "/usr/lib/python3.8/site-packages/gallery_dl/extractor/instagram.py", line 44, in items
    url = data['video_url'] or data['display_url']
KeyError: 'video_url'
@mikf mikf closed this as completed in edc0804 Nov 19, 2019
@mikf mikf added the bug label Nov 19, 2019
@EveKaczmarek
Copy link
Author

Not fixed yet.

$ gallery-dl -u username -p password -o extractor.instagram.highlights=true --verbose https://www.instagram.com/katsumicos
[gallery-dl][debug] Version 1.11.2-dev
[gallery-dl][debug] Python 3.8.0 - Linux-5.3.11-3-clear-x86_64-with-glibc2.2.5
[gallery-dl][debug] requests 2.22.0 - urllib3 1.25.7
[gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/katsumicos'
[gallery-dl][debug] Updating urllib3 ciphers
[instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/katsumicos'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /katsumicos/ HTTP/1.1" 302 0
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /terms/unblock/?next=/katsumicos/ HTTP/1.1" 200 10784
[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 "/usr/lib/python3.8/site-packages/gallery_dl/job.py", line 48, in run
    for msg in self.extractor:
  File "/usr/lib/python3.8/site-packages/gallery_dl/extractor/instagram.py", line 35, in items
    for data in self.instagrams():
  File "/usr/lib/python3.8/site-packages/gallery_dl/extractor/instagram.py", line 420, in instagrams
    yield from self._extract_story_highlights(shared_data)
  File "/usr/lib/python3.8/site-packages/gallery_dl/extractor/instagram.py", line 222, in _extract_story_highlights
    graphql = shared_data['entry_data']['ProfilePage'][0]['graphql']
KeyError: 'ProfilePage'

@mikf
Copy link
Owner

mikf commented Nov 19, 2019

[debug] https://www.instagram.com:443 "GET /katsumicos/ HTTP/1.1" 302 0
[debug] https://www.instagram.com:443 "GET /terms/unblock/?next=/katsumicos/ HTTP/1.1" 200 10784

You got redirected to https://www.instagram.com/terms/unblock/ when trying to access the profile page. Visit this URL in your browser and see what they want from you. I'd image it works afterwards.

@EveKaczmarek
Copy link
Author

Now working just fine. Thanks for the help.

@joon90
Copy link

joon90 commented Nov 22, 2019

Bumping this since I noticed that Instagram Stories aren't being downloaded since a couple of days ago.

[gallery-dl][debug] Version 1.11.2-dev
[gallery-dl][debug] Python 3.7.4 - Windows-7-6.1.7601-SP1
[gallery-dl][debug] requests 2.22.0 - urllib3 1.25.3
[gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/stories/kobatomiku/'
[gallery-dl][debug] Updating urllib3 ciphers
[instagram][debug] Using InstagramStoriesExtractor for 'https://www.instagram.com/stories/kobatomiku/'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /stories/kobatomiku/ HTTP/1.1" 200 10021
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /graphql/query/?query_hash=cda12de4f7fd3719c0569ce03589f4c4&variables=%7B%22reel_ids%22:%5B%221824274067%22%5D,%22tag_names%22:%5B%5D,%22location_ids%22:%5B%5D,%22highlight_reel_ids%22:%5B%5D,%22precomposed_overlay%22:true,%22show_story_viewer_list%22:true,%22story_viewer_fetch_count%22:50,%22story_viewer_cursor%22:%22%22,%22stories_video_dash_manifest%22:false%7D HTTP/1.1" 200 41

Not sure what changed, but only regular posts are being downloaded.

@mikf
Copy link
Owner

mikf commented Nov 23, 2019

@joon90 works for me:

$ gallery-dl -u <email> https://www.instagram.com/stories/kobatomiku/
/tmp/instagram/kobatomiku/2182814317991609109.jpg

I'm assuming you are logged in, so maybe the cached sessionid cookie is no longer valid.
Try gallery-dl --clear-cache to force a re-login and try again.

@joon90
Copy link

joon90 commented Nov 23, 2019

That seems to have done the trick. I somehow managed to get a temporary IP ban from downloading too much at once, so I guess that's why it needed to login again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants