4

Following is the error that youtube-dl gave me. Another tool you-get gave me a similar error. What should I do to download videos from youtube.

[~] youtube-dl -f 137 https://youtu.be/0Ef9GudbxXY

17:27:23 [youtube] 0Ef9GudbxXY: Downloading webpage ERROR: Unable to download webpage: (caused by URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)'),))

William Song
  • 577
  • 6
  • 17

2 Answers2

3

This error means that there is a problem with the TLS certificate. Typical suspects are, in rough order descending likeliness, according to my experiences working as a youtube-dl developer:

  • Censorship by your country, especially if you are located in or near China, Pakistan, or other non-democratic countries. You can use a VPN or TOR with a bridge to avoid the censorship.
  • Censorship by your company, school, or ISP. Again, a VPN (or proxy) can avoid this.
  • Local anti-malware software trying to intercept connections.
  • Local malware software trying to intercept connections.
  • A proxy server that is now misbehaving. Add -v to the command line to see whether one is configured.
  • A local configuration problem, i.e. missing certificate store or so. This depends a lot on how you installed youtube-dl.
  • A configuration problem on YouTube's side.

In any case, you can avoid certificate checking by passing in --no-check-certificate. However, note that this will allow nation states, ISPs, schools/companies, hackers, and other (semi-)malicious parties to log, intercept, and change your video traffic.

Note: The video https://youtu.be/0Ef9GudbxXY is not available in format 137. Simply leave out -f to get the best available format.

  • 1
    @WilliamSong If this (or any other) answer solved your problem, please consider [accepting it](https://meta.stackexchange.com/a/5235/141962). Thanks! –  Aug 15 '18 at 07:42
0

Upgrading python version 2.7.18 to latest fixed this error.