youtube-dl: ERROR: unable to download video data:
On quite a few different sites, I get the following error -
ERROR: unable to download video data: <urlopen error [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1076)>
Traceback (most recent call last):
File "/usr/lib/python3.7/urllib/request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/lib/python3.7/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/lib/python3.7/http/client.py", line 1422, in connect
server_hostname=server_hostname)
File "/usr/lib/python3.7/ssl.py", line 423, in wrap_socket
session=session
File "/usr/lib/python3.7/ssl.py", line 870, in _create
self.do_handshake()
File "/usr/lib/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1076)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 1925, in process_info
success = dl(filename, info_dict)
File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 1864, in dl
return fd.download(name, info)
File "/usr/lib/python3/dist-packages/youtube_dl/downloader/common.py", line 366, in download
return self.real_download(filename, info_dict)
File "/usr/lib/python3/dist-packages/youtube_dl/downloader/http.py", line 341, in real_download
establish_connection()
File "/usr/lib/python3/dist-packages/youtube_dl/downloader/http.py", line 109, in establish_connection
ctx.data = self.ydl.urlopen(request)
File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 2237, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/lib/python3/dist-packages/youtube_dl/utils.py", line 2724, in https_open
req, **kwargs)
File "/usr/lib/python3.7/urllib/request.py", line 1319, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: WRONG_SIGNATURE_TYPE] wrong signature type (_ssl.c:1076)>
And this is when we have -
Package: youtube-dl
Version: 2019.09.28-1
Severity: normal
-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (900, 'testing'), (500, 'testing-debug'), (100, 'unstable-debug'), (100, 'experimental'), (100, 'unstable'), (50, 'experimental-debug')
Architecture: amd64 (x86_64)
Kernel: Linux 5.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8), LANGUAGE=en_IN:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages youtube-dl depends on:
ii python3 3.7.5-1
ii python3-pkg-resources 41.2.0-1
Versions of packages youtube-dl recommends:
ii ca-certificates 20190110
ii curl 7.66.0-1
ii ffmpeg 7:4.1.4-1+b2
ii mpv 0.29.1-1
ii phantomjs 2.1.1+dfsg-2+b1
ii python3-pyxattr 0.6.1-1
ii rtmpdump 2.4+20151223.gitfa8646d.1-2
ii wget 1.20.3-1+b1
youtube-dl suggests no packages.
-- no debconf information
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 20
This isn’t a direct issue of youtube-dl, this is related to openssl version 1.1.1 hardening the security of your system… in fact, the interoperability bug is on the server side (appears to be a wrong TLS 1.2 implementation). I don’t know why this isn’t overcome with the
--no-check-certificateparameter, but if you’re using Debian 10 (no idea where is located in other distros), just open your/etc/ssl/openssl.cnf, go to the last line and change:CipherString = DEFAULT@SECLEVEL=2to:
CipherString = DEFAULT@SECLEVEL=1Bear in mind that you are making your system less secure with this workaround, so use it with caution
Further reading: https://wiki.debian.org/ContinuousIntegration/TriagingTips/openssl-1.1.1 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907015 https://community.home-assistant.io/t/debian-10-and-openssl-1-1-1b-wrong-signature-type-errors/121050 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912759