码迷,mamicode.com
首页 > 编程语言 > 详细

python解决SNIMissingWarning和InsecurePlatformWarning警告

时间:2017-04-27 23:16:57      阅读:374      评论:0      收藏:0      [点我收藏+]

标签:ffffff   object   mat   latest   mic   python   ade   运行时   his   

在爬取豆瓣等动态网站时,在运行时会提出SNIMissingWarning和InsecurePlatformWarning警告

详细警告内容如下:

 D:\Python2.7.8\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

D:\Python2.7.8\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 
解决方法:
在cmd中输入:
pip install pyopenssl ndg-httpsclient pyasn1

 

python解决SNIMissingWarning和InsecurePlatformWarning警告

标签:ffffff   object   mat   latest   mic   python   ade   运行时   his   

原文地址:http://www.cnblogs.com/gsxx/p/6777267.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!