Reputation: 1
Learning to scrape a website. "https://www.localharvest.org/" for now. trying to urlopen but gives the above mentioned error. Windows 10 64-64 bit, Python 3.7.1
from urllib.request import urlopen
from bs4 import BeautifulSoup as soup
url = 'https://www.localharvest.org/'
response = urlopen(url)
Upvotes: 0
Views: 4765
Reputation: 520
In Ubuntu 20.04, this helped me
sudo update-ca-certificates --fresh
export SSL_CERT_DIR=/etc/ssl/certs
Upvotes: 1
Reputation: 63
Via PIP - bash pip install --upgrade certifi
timon.web: Fixing CERTIFICATE_VERIFY_FAILED error
Upvotes: 0