Python爬虫之报错certificate verify failed: unable to get local issuer certificate

先检查本机有没有在使用Fiddler之类的代理软件!!! 先检查本机有没有在使用Fiddler之类的代理软件!!! 先检查本机有没有在使用Fiddler之类的代理软件!!!
今天联系Python爬虫时,有些页面如https://www.baidu.com/没有任何问题,但有些页面比如https://baike.baidu.com/item/%E7%99%BE%E7%A7%91/29?fr=aladdin却报如下错很明显是ssl出错了,我们需要引入ssl模块进行处理,出现这个报错据说和代理有关,还在查,有知道的同学可以一起评论交流 修改代码后如下
from urllib import request,parse
import ssl
context = ssl._create_unverified_context()
req = urllib.request.urlopen('https://baike.baidu.com/item/%E7%99%BE%E7%A7%91/29?fr=aladdin',context=context)
htmlDom=req.read().decode('utf-8')
print(htmlDom)
运行代码,完美解决,