学习抓取网站。现在为“ https://www.localharvest.org/。尝试urlopen,但给出上述错误。 Windows 10 64-64位,Python 3.7.1
from urllib.request import urlopen
from bs4 import BeautifulSoup as soup
url = 'https://www.localharvest.org/'
response = urlopen(url)
答案 0 :(得分:0)
通过PIP-bash pip install --upgrade认证
答案 1 :(得分:0)
在 Ubuntu 20.04 中,这对我有帮助
sudo update-ca-certificates --fresh
export SSL_CERT_DIR=/etc/ssl/certs