urllib错误SSL:在windows 10中进行web抓取时,Python 3.7中的证书\u验证\u失败

urllib错误SSL:在windows 10中进行web抓取时,Python 3.7中的证书\u验证\u失败,python,web-scraping,beautifulsoup,ssl-certificate,urllib,Python,Web Scraping,Beautifulsoup,Ssl Certificate,Urllib,我试图在Windows10上使用Python3.7IDE中的urllib和bs4从页面获取信息 当我执行代码时,我得到以下错误: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)> 错误在我的计算机上不可再现(也是windows 10

我试图在Windows10上使用Python3.7IDE中的urllib和bs4从页面获取信息

当我执行代码时,我得到以下错误:

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>

错误在我的计算机上不可再现(也是windows 10、python 3.7)@supersormer,这是否意味着它对您适用?是的,它对您适用me@SuperStormer知道为什么吗?,我在某个地方读到,也许我需要安装与ssl相关的东西?您需要下载一个ca证书捆绑包并将路径设置为。错误在我的计算机上不可复制(也是windows 10,python 3.7)@supersormer,这是否意味着它适合您?是的,它适合您me@SuperStormer知道为什么吗?,我在某个地方读到,也许我需要安装一些与ssl相关的东西?有一个ca证书包,你需要下载并设置路径。
import bs4
from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup

my_url = 'https://carta-natal.es/astros_ahora.php'

# Grab the url and download it
uClient = uReq(my_url)

# Reads the content and storage it 
page_html = uClient.read()

# Close the connection
uClient.close()

# html parsing
page_soup = soup(page_html, "html.parser")

print(page_soup.h1)