原文:urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed解决办法

描述 今天学习写一篇用python 我的是Python . 登录知乎网 https: www.zhihu.com 的爬虫,测试时报错:urlopen error SSL: CERTIFICATE VERIFY FAILED certificate verify failed 原因分析 查找相关资料后确定为,Python . . 之后版本引入了一个新特性:当你urllib.urlopen一个 htt ...

2017-11-27 10:27 0 10056 推荐指数:

查看详情

python urlopen SSL: CERTIFICATE_VERIFY_FAILED

1.使用ssl创建未经验证的上下文,在urlopen中传入上下文参数 import sslimport urllib2 context = ssl._create_unverified_context()print urllib2.urlopen("https://www.12306.cn ...

Mon Mar 07 19:08:00 CST 2016 0 1797
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM