SNIMissingWarning和InsecurePlatformWarning警告

Posted EmilySun

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SNIMissingWarning和InsecurePlatformWarning警告相关的知识,希望对你有一定的参考价值。

在爬取weibo.com等动态网站时,pycharm在运行时会提出SNIMissingWarning和InsecurePlatformWarning警告

详细警告内容如下:

 

 D:\Python2.7.6\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.6\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 
 
解决方法:
在DOS窗口中输入:
pip install pyopenssl ndg-httpsclient pyasn1

以上是关于SNIMissingWarning和InsecurePlatformWarning警告的主要内容,如果未能解决你的问题,请参考以下文章

python解决SNIMissingWarning和InsecurePlatformWarning警告

解决:python爬取https站点时SNIMissingWarning和InsecurePlatformWarning

MySQL5.6警告信息 command line interface can be insecur

python django 基本测试 及调试 201812

registry

与服务人员反应生产错误:无效的 MIME 类型