您的位置:首页 > 编程语言 > Python开发

python SNIMissingWarning InsecurePlatformWarning

2017-11-18 21:54 447 查看
在python2.7.6 下使用requests进行爬网络数据时,遇到问题:

问题:

C:\Python2.7\lib\site-packages\requests\packages\urllib3\util\ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.

SNIMissingWarning

C:\Python2.7\lib\site-packages\requests\packages\urllib3\util\ssl_.py:120: 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


参考

http://blog.csdn.net/Alex_X_Jane/article/details/51146537
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐