python-scraping
python-scraping copied to clipboard
[SSL: CERTIFICATE_VERIFY_FAILED] on pythonscraping
When running the code in the first two chapters that use pythonscraping.com I receive the following error:
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1125)>
我已收到您的邮件,谢谢!
@Ryan-Bringenberg you need to use this code import ssl ssl._create_default_https_context = ssl._create_unverified_context
Example:
from urllib.request import urlopen import ssl ssl._create_default_https_context = ssl._create_unverified_context
html = urlopen('http://pythonscraping.com/pages/page1.html') print(html.read())
我已收到您的邮件,谢谢!
I update my system, in conda: conda update -n base -c defaults conda
@scarbear06 - Why is that not included in the book already? Or is there a way to update our system to have that automatically run with the script?