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

gallery-dl seems to refuse to download Instagram posts with no likes. #5218

Closed
PuFf3rL1GhTy opened this issue Feb 19, 2024 · 1 comment
Closed
Labels

Comments

@PuFf3rL1GhTy
Copy link

PuFf3rL1GhTy commented Feb 19, 2024

gallery-dl --verbose https://www.instagram.com/p/post_nolikes/
[gallery-dl][debug] Version 1.26.6
[gallery-dl][debug] Python 3.12.2 - Windows-11-10.0.22631-SP0
[gallery-dl][debug] requests 2.31.0 - urllib3 2.1.0
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/p/post_nolikes/'
[instagram][debug] Using InstagramPostExtractor for 'https://www.instagram.com/p/post_nolikes'
[instagram][debug] Loading cookies from 'C:/Users/user/Downloads/www.instagram.com_cookies.txt'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /api/v1/media/random_numbers/info/ HTTP/1.1" 200 7687
[instagram][error] An unexpected error occurred: KeyError - 'like_count'. 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\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\gallery_dl\job.py", line 127, in run
    for msg in extractor:
  File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\gallery_dl\extractor\instagram.py", line 70, in items
    post = self._parse_post_rest(post)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\gallery_dl\extractor\instagram.py", line 168, in _parse_post_rest
    "likes": post["like_count"],
             ~~~~^^^^^^^^^^^^^^
KeyError: 'like_count'
@mikf mikf added the site:bug label Feb 19, 2024
@PuFf3rL1GhTy
Copy link
Author

Edit: it seems this error appears on sponsored posts, which do not have a like counter.

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

2 participants