python接口请求ssl安全验证跳过,警告解除InsecureRequestWarning解决办法

coding=utf-8
import requests
import urllib3
“”“python 跳过安全验证ssl解除InsecureRequestWarning:加上下面这句”""
urllib3.disable_warnings()
r=requests.get(url=“https://www.baidu.com/”,verify=False)
print r.elapsed.total_seconds()
--------------------- 
作者:流浪的python 
来源:CSDN 
原文:https://blog.csdn.net/chen498858336/article/details/84147196 
版权声明:本文为博主原创文章,转载请附上博文链接!
C:\Python27\lib\site-packages\urllib3\connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
0.835025

coding=utf-8

import requests
import urllib3
“”“python 跳过安全验证ssl解除InsecureRequestWarning”""
urllib3.disable_warnings()
r=requests.get(url=“https://www.baidu.com/”,verify=False)
print r.elapsed.total_seconds()

你可能感兴趣的:(接口测试)