-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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] An unexpected error occurred: KeyError - "name='csrftoken', domain=None, path=None" #1631
Comments
try to use double-quotes, example:
or try to use cookies as in: https://github.com/mikf/gallery-dl#cookies, https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorcookies |
Thank you for your fast answer:
Same for instagram.com |
No no no. the file is downloaded as:
|
still try clearing the
and do the following to see if it gave the same result:
The only thing I can think of is that the
or try clearing the |
Instagram has changed its login procedure, it seems. Any new login ( |
Okay, the cookies method works :) Another noob question, is the gallery-dl.conf created while installing gallery-dl or do i need to create and fill it out myself? |
nice
not. I recommend you close this one and start a new one about your doubts. |
You have to create it yourself. You can use this as a template, though. |
I changed my notebook and after installing python3 and the pip version of gallery-dl, i cant download any more. I pretty sure the error lays on my side, but i cant solve this alone.
The user and password are correct.
PS C:\Temp> gallery-dl -u *** -p *** https://www.instagram.com/euro2020/ --sleep 15 --verbose
[gallery-dl][debug] Version 1.17.5
[gallery-dl][debug] Python 3.9.5 - Windows-10-10.0.19043-SP0
[gallery-dl][debug] requests 2.22.0 - urllib3 1.25.8
[gallery-dl][debug] Starting DownloadJob for 'https://www.instagram.com/euro2020/'
[instagram][debug] Using InstagramUserExtractor for 'https://www.instagram.com/euro2020/'
[instagram][debug] Using InstagramPostsExtractor for 'https://www.instagram.com/euro2020/posts/'
[instagram][info] Logging in as ***
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.instagram.com:443
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /accounts/login/ HTTP/1.1" 200 20173
[instagram][debug] Sleeping for 4.999 seconds
[urllib3.connectionpool][debug] https://www.instagram.com:443 "GET /web/__mid/ HTTP/1.1" 200 28
[instagram][error] An unexpected error occurred: KeyError - "name='csrftoken', domain=None, path=None". 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\xyz\appdata\local\programs\python\python39\lib\site-packages\gallery_dl\job.py", line 74, in run
for msg in self.extractor:
File "c:\users\xyz\appdata\local\programs\python\python39\lib\site-packages\gallery_dl\extractor\instagram.py", line 43, in items
self.login()
File "c:\users\xyz\appdata\local\programs\python\python39\lib\site-packages\gallery_dl\extractor\instagram.py", line 125, in login
self._update_cookies(self._login_impl(username, password))
File "c:\users\xyz\appdata\local\programs\python\python39\lib\site-packages\gallery_dl\cache.py", line 115, in call
value = self.func(*args, **kwargs)
File "c:\users\xyz\appdata\local\programs\python\python39\lib\site-packages\gallery_dl\extractor\instagram.py", line 142, in _login_impl
headers["X-CSRFToken"] = response.cookies["csrftoken"]
File "C:\Users\xyz\AppData\Roaming\Python\Python39\site-packages\requests\cookies.py", line 328, in getitem
return self._find_no_duplicates(name)
File "C:\Users\xyz\AppData\Roaming\Python\Python39\site-packages\requests\cookies.py", line 399, in _find_no_duplicates
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name='csrftoken', domain=None, path=None"
Can somebody help me out?
The text was updated successfully, but these errors were encountered: