python提示警告InsecureRequestWarning

在Python3中使用以下代码报错:

import requests
response = requests.get(url='', verify=False)

 

错误代码如下:

InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advise

 

解决:

import requests
requests.packages.urllib3.disable_warnings()
response = requests.get(url, verify=False)

 

上一篇:Queue 循环队列代码 java


下一篇:四、考研数据结构笔记——栈与队列基础知识(栈与队列的理解,易混淆点,熟记的代码)