Python requests 模拟https请求报错:
c:\Python27\lib\site-packages\requests-2.6.0-py2.7.egg\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
解决办法:
一、取消使用SSL验证。 requests.get("https://www.baidu.com", verify=False)
二、安装openssl第三方库
easy_install requests[security]
pyopenssl ndg-httpsclient pyasn1
apt-get install libffi-dev libssl-dev
http://stackoverflow.com/questions/29134512/insecureplatformwarning-a-true-sslcontext-object-is-not-available-this-prevent