Document setting PYTHONHTTPSVERIFY to 0 for disabling SSL validation in the jenkins_job module
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain
Installation failure at PYTHONHTTPSVERIFY=0 buildout - Questions and Answers - SENAITE Community
python - Scraping: SSL: CERTIFICATE_VERIFY_FAILED error for http://en.wikipedia.org - Stack Overflow
Videos
Once upon a time I stumbled with this issue. If you're using macOS go to Macintosh HD > Applications > Python3.6 folder (or whatever version of python you're using) > double click on "Install Certificates.command" file. :D
to use unverified ssl you can add this to your code:
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
So I made a Youtube Video Downloader, but because I encountered some SSL verification errors, I'm not sure if my work around is 'best practice'.
import os# Disabling SSL verification (not recommended for production code)os.environ['PYTHONHTTPSVERIFY'] = '0'import sslssl._create_default_https_context = ssl._create_unverified_contextfrom pytube import YouTubelink = str(input("Enter Your Link: "))yt = YouTube(link)stream = yt.streams.get_highest_resolution()# Path to your specific Downloads folderdownloads_folder = '/Users/name/Downloads'# Download the video to the specified folderstream.download(output_path=downloads_folder)print("Download Successful")
It works well, but because I'm a noob, was wondering if anyone can offer any advice on improvements?