-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
KeyError: 'last-modified' #188
Comments
Also reproduce-able with 4.1.1 |
Does this problem still persist? I cannot reproduce it currently, neither did it occur during our daily unit tests. |
I have the same problem using version 4.1.1. The error occurs while downloading of a lot of profile pics, during the download of a few profile pics the error never occurs. |
It happens to me too. Ignore the instagram profile theme/photos (lol), but I receive the error only when gathering this single profile of 350. It is open to everyone so it shouldn't have any issue.
Edit: Using latest windows release (4.2) and tried with other parameters, like -F. |
@hgkmaxymus Thanks for reporting and for mentioning a profile where that happens, making it possible for us to fix the bug with commit 4bc0a94. Now, in case the last modified timestamp of the profile pic is not available, a hash is used in the profile pic filename. Upgrade Instaloader with
|
This fixes instaloader#188. Also, this commit prevents double-requesting the profile pic URL to obtain the Last-Modified header.
Describe the bug
KeyError when run
To Reproduce
Steps to reproduce the behavior:
/usr/local/bin/instaloader --login=XX --sessionfile=/mnt/insta/.instaloader-session --fast-update --no-metadata-json --no-captions --stories --highlights --tagged XXX
Error messages and tracebacks
Traceback (most recent call last):
File "/usr/local/bin/instaloader", line 9, in
load_entry_point('instaloader==4.1', 'console_scripts', 'instaloader')()
File "/usr/local/lib/python3.5/dist-packages/instaloader/main.py", line 388, in main
storyitem_filter_str=args.storyitem_filter)
File "/usr/local/lib/python3.5/dist-packages/instaloader/main.py", line 171, in _main
download_stories, fast_update, post_filter, storyitem_filter)
File "/usr/local/lib/python3.5/dist-packages/instaloader/instaloader.py", line 823, in download_profiles
self.download_profilepic(profile)
File "/usr/local/lib/python3.5/dist-packages/instaloader/instaloader.py", line 281, in download_profilepic
date_object = datetime.strptime(anonymous_session.head(profile_pic_url).headers["Last-Modified"],
File "/usr/local/lib/python3.5/dist-packages/requests/structures.py", line 54, in getitem
return self._store[key.lower()][1]
KeyError: 'last-modified'
Instaloader version
4.1
The text was updated successfully, but these errors were encountered: