-
-
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
[twitter][error] An unexpected error occurred: ValueError - Cannot set verify_mode to CERT_NONE when check_hostname is enabled.. #3614
Comments
nitter.net works gallery-dl https://nitter.net/CatWorkers/media -d CatWorkers --verbose |
Might be related to the default TLS ciphers used for Twitter. Try disabling the default |
Same error here :'( I've tried to dig but didn't find any solution yet |
Same error here:
|
e.g. when 'browser' is set to a non-empty value and gallery-dl creates its own SSLContext instance instead of using requests' and urllib3's defaults. urllib3 disables this option for its default contexts, since it does this check on its own. Fixes "ValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled" when using --no-check-certificate. (#3614, #4891, #5576)
$ gallery-dl https://twitter.com/CatWorkers/media -d CatWorkers --verbose
[gallery-dl][debug] Version 1.25.0-dev
[gallery-dl][debug] Python 3.7.3 - Linux-3.13.0-170-generic-x86_64-with-debian-jessie-sid
[gallery-dl][debug] requests 2.28.1 - urllib3 1.26.14
[gallery-dl][debug] Configuration Files ['${HOME}/.gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://twitter.com/CatWorkers/media'
[twitter][debug] Using TwitterMediaExtractor for 'https://twitter.com/CatWorkers/media'
[twitter][info] Requesting guest token
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.twitter.com:443
[twitter][error] An unexpected error occurred: ValueError - Cannot set verify_mode to CERT_NONE when check_hostname is enabled.. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[twitter][debug]
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/gallery_dl/job.py", line 91, in run
for msg in extractor:
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/twitter.py", line 73, in items
for tweet in self.tweets():
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/twitter.py", line 541, in tweets
return self.api.user_media(self.user)
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/twitter.py", line 1070, in user_media
"userId": self._user_id_by_screen_name(screen_name),
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/twitter.py", line 1179, in _user_id_by_screen_name
user = self.user_by_screen_name(screen_name)
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/twitter.py", line 1171, in user_by_screen_name
return self._call(endpoint, params)["data"]["user"]["result"]
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/twitter.py", line 1208, in _call
self._authenticate_guest()
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/twitter.py", line 1197, in _authenticate_guest
guest_token = self._guest_token()
File "/usr/local/lib/python3.7/site-packages/gallery_dl/cache.py", line 115, in call
value = self.func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/twitter.py", line 1194, in _guest_token
return str(self._call(endpoint, None, "POST", False)["guest_token"])
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/twitter.py", line 1212, in _call
headers=self.headers, fatal=None)
File "/usr/local/lib/python3.7/site-packages/gallery_dl/extractor/common.py", line 135, in request
response = session.request(method, url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 499, in send
timeout=timeout,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 710, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 401, in connect
context.verify_mode = resolve_cert_reqs(self.cert_reqs)
File "/usr/local/lib/python3.7/ssl.py", line 548, in verify_mode
super(SSLContext, SSLContext).verify_mode.set(self, value)
ValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled.
The text was updated successfully, but these errors were encountered: