报错:
/usr/lib/python2.7/site-packages/requests/packages/urllib3/
connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See:
https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
解决办法
使用requests时,访问的是https类型的网址,因为https用了ss加密,会报这种insecureplatformwarning,平台非安全警告,大概与https有关,直接警告信息的网址
https://urllib3.readthedocs.org/en/latest/security.html
在限制urllib3所应用的配置的ssl模块,在某些Python版本(特别是2.7.9之前的)有限制,特别的是,这导致HTTPS请求在本来更多的功能平台成功的变成失败,还有导致某些安全功能模块失效。
如果你遇到这个警告,强烈建议升级到高版本的python版本,或者在OpenSSL/PyOpenSSL部分描述的,你要使用pyOpenSSL。
操作
yum install python-devel libffi-devel openssl-devel
pip install pyopenssl ndg-httpsclient pyasn1