您的位置:首页 > 理论基础 > 计算机网络

python爬虫之requests对https的限制访问

2017-06-28 00:03 309 查看
如果想要爬取的一个网站时返回错误如下:
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:79:InsecurePlatformWarning:
A true SSLContext object is not available.This prevents urllib3 from configuring SSL appropriately and may cause certain SSL
connections to fail.For more information, see https://urllib3.readthedocs.org/en/latest/security.html# insecureplatformwarning.InsecurePlatformWarning

此时,执行此指令:

pip install pyopenssl ndg-httpsclient pyasn1
这种错误应该时因为python版本过低(比如python2.7),https的加密又无法被requests请求成功
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: