youtube-dl gave me an error about ssl

混江龙づ霸主 提交于 2020-07-03 05:15:42

问题


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)'),))


回答1:


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.



来源:https://stackoverflow.com/questions/51785882/youtube-dl-gave-me-an-error-about-ssl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!