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

Handle video posts with no thumbnail more gracefully #773

Closed
fireattack opened this issue Aug 15, 2020 · 1 comment · Fixed by #776
Closed

Handle video posts with no thumbnail more gracefully #773

fireattack opened this issue Aug 15, 2020 · 1 comment · Fixed by #776
Labels
bug Bug

Comments

@fireattack
Copy link
Collaborator

Describe the bug
Currently if a post has no thumbnail, it returns 410 (it happens even on web, so 410 itself isn't an issue of instaloader) and the download fails.

To Reproduce
--login={username} -- -BkQQ-fKhZe9

(https://www.instagram.com/tv/BkQQ-fKhZe9/ or the oldest post of https://www.instagram.com/natgeo/channel/, you can see it indeed doesn't have a thumbnail.)

Expected behavior
The video itself should still be downloaded.

Error messages and tracebacks

Exception has occurred: ConnectionException
HTTP error code 410.
  File "G:\_temp\instaloader\instaloader\instaloadercontext.py", line 577, in get_raw
    raise ConnectionException("HTTP error code {}.".format(resp.status_code))
  File "G:\_temp\instaloader\instaloader\instaloadercontext.py", line 585, in get_and_write_raw
    self.write_raw(self.get_raw(url), filename)
  File "G:\_temp\instaloader\instaloader\instaloader.py", line 261, in download_pic
    self.context.get_and_write_raw(url, filename)
  File "G:\_temp\instaloader\instaloader\instaloader.py", line 79, in call
    return func(instaloader, *args, **kwargs)
  File "G:\_temp\instaloader\instaloader\instaloader.py", line 527, in download_post
    downloaded = self.download_pic(filename=filename, url=post.url, mtime=post.date_local)
  File "G:\_temp\instaloader\instaloader\__main__.py", line 153, in _main
    instaloader.download_post(Post.from_shortcode(instaloader.context, target[1:]), target)
  File "G:\_temp\instaloader\instaloader\__main__.py", line 423, in main
    _main(loader,
  File "G:\_temp\instaloader\instaloader.py", line 6, in <module>
    main()

Instaloader version
4.4.4

@aandergr
Copy link
Member

Fixed in Version 4.5.1.

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

Successfully merging a pull request may close this issue.

2 participants