【python requests警告】python3.x requests库取消ssl验证,InsecureRequestWarning: Unverified HTTPS request is be

警告信息:

 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)

原因

是因为在请求的时候request.get(url,verify=False)导致的

解决

import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

就搞定了

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页