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

[youtube] IuRwqB9NwVQ: Unable to download webpage: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997) #31721

Open
chromeosisBS opened this issue Feb 27, 2023 · 6 comments

Comments

@chromeosisBS
Copy link

chromeosisBS commented Feb 27, 2023

When i try to run youtube-dl, i get this error

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=IuRwqB9NwVQ', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.7 (CPython) - macOS-11.7.4-x86_64-i386-64bit
[debug] exe versions: ffmpeg 5.1.2, ffprobe 5.1.2
[debug] Proxy map: {}
[youtube] IuRwqB9NwVQ: Downloading webpage
WARNING: Unable to download webpage: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)>
[youtube] IuRwqB9NwVQ: Downloading API JSON
ERROR: Unable to download API page: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)> (caused by URLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)')))
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/extractor/common.py", line 634, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/YoutubeDL.py", line 2288, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python@3.10/3.10.7/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/usr/local/Cellar/python@3.10/3.10.7/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/local/Cellar/python@3.10/3.10.7/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/local/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.10/site-packages/youtube_dl/utils.py", line 2735, in https_open
    return self.do_open(functools.partial(
  File "/usr/local/Cellar/python@3.10/3.10.7/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)

The command i am running is: youtube-dl "https://www.youtube.com/watch?v=IuRwqB9NwVQ" -v, i tried updating youtube-dl, and ffmpeg with homebrew, but same problem occurs

@dirkf
Copy link
Contributor

dirkf commented Feb 28, 2023

Does this happen for the same URL in the browser?

Is your system time correct?

Have you recently updated OpenSSL?

Review yt-dlp/yt-dlp#2043.

@dirkf dirkf changed the title Unable to download webpage: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997)> [youtube] IuRwqB9NwVQ: Downloading API JSON [youtube] IuRwqB9NwVQ: Unable to download webpage: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:997) Feb 28, 2023
@october262
Copy link

try updating / upgrading your version of python.

@chromeosisBS
Copy link
Author

Tried updating OpenSSL, works in browser, updating python did nothing either, and i tried reinstalling ytdl, But no luck.

@dirkf
Copy link
Contributor

dirkf commented Mar 1, 2023

Post the security parameters negotiated by the browser, like this:

Protocol version:	TLSv1.3
Cipher suite:           TLS_AES_128_GCM_SHA256	
Key Exchange Group:	x25519
Signature Scheme:	RSA-PSS-SHA256

You should find this in some PageInfo menu item, or with the browser's devtools. Also check that the certificate for the page is actually YouTube's.

You may be accessing YouTube via some https proxy (eg, "security" package on your gateway device, or in the ISP) that is breaking the connection. Can you try bypassing the ISP connection, eg with a phone hot-spot?

@dirkf
Copy link
Contributor

dirkf commented Mar 6, 2023

@chromeosisBS ?

@chromeosisBS
Copy link
Author

chromeosisBS commented Mar 6, 2023 via email

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

No branches or pull requests

3 participants