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

Uncaught ssl.CertificateError #9005

Closed
olf42 opened this issue Mar 27, 2016 · 3 comments
Closed

Uncaught ssl.CertificateError #9005

olf42 opened this issue Mar 27, 2016 · 3 comments

Comments

@olf42
Copy link

@olf42 olf42 commented Mar 27, 2016

Hi,

I ran into an uncaught ssl.CertificateError today, as I tried to download a video from ZDF-Mediathek. It seems that ZDF is using a bad certificate, but youtube-dl crashes badly.

I entered:

youtube-dl "http://www.zdf.de/ZDFmediathek#/beitrag/video/2696938/Hacker,-Freaks-und-Funktion%C3%A4re"

(It may not work from outside germany. Furthermore in a few days the movie is likely to be removed due to (de)publication guidelines)

I end up with:

[ZDF] 2696938: Downloading video info
[ZDF] 2696938: Downloading SMIL file
[ZDF] 2696938: Downloading f4m manifest
[ZDF] 2696938: Downloading m3u8 information
[ZDF] 2696938: Downloading m3u8 information

Followed by this traceback:

Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 9, in <module>
    load_entry_point('youtube-dl==2016.1.9', 'console_scripts', 'youtube-dl')()
  File "/usr/lib/python3.5/site-packages/youtube_dl/__init__.py", line 410, in main
    _real_main(argv)
  File "/usr/lib/python3.5/site-packages/youtube_dl/__init__.py", line 400, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1677, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 665, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 312, in extract
    return self._real_extract(url)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/zdf.py", line 194, in _real_extract
    return self.extract_from_xml_url(video_id, xml_url)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/zdf.py", line 141, in extract_from_xml_url
    video_url, video_id, 'mp4', m3u8_id=format_id, fatal=False))
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 975, in _extract_m3u8_formats
    fatal=fatal)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 371, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 351, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1890, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 465, in open
    response = self._open(req, data)
  File "/usr/lib/python3.5/urllib/request.py", line 483, in _open
    '_open', req)
  File "/usr/lib/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/site-packages/youtube_dl/utils.py", line 830, in https_open
    req, **kwargs)
  File "/usr/lib/python3.5/urllib/request.py", line 1240, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.5/http/client.py", line 1083, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1079, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 911, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 854, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 1237, in connect
    server_hostname=server_hostname)
  File "/usr/lib/python3.5/ssl.py", line 376, in wrap_socket
    _context=self)
  File "/usr/lib/python3.5/ssl.py", line 747, in __init__
    self.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 983, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake
    match_hostname(self.getpeercert(), self.server_hostname)
  File "/usr/lib/python3.5/ssl.py", line 296, in match_hostname
    % (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname 'zdf-hdios-none-i.zdf.de' doesn't match either of 'a248.e.akamai.net', '*.akamaihd.net', '*.akamaihd-staging.net', '*.akamaized.net', '*.akamaized-staging.net'

I use archlinux, and youtube-dl version

2016.01.09

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 27, 2016

  1. You are using an outdated version of youtube-dl. Read our FAQ if you have troubles updating.
  2. They use misconfigured certificates for some URLs (those are skipped in latter versions of youtube-dl).
@dstftw dstftw closed this Mar 27, 2016
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 27, 2016

If you are not willing to update unsecure solution is to use --no-check-certificate.

@olf42
Copy link
Author

@olf42 olf42 commented Mar 27, 2016

Thank you for the quick response.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.