概述

当遇到未经验证的HTTPS请求提示时,需要屏蔽掉。

InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  warnings.warn(

解决方法

在import requests下添加

import requests
#解决Unverified HTTPS request is being made
requests.packages.urllib3.disable_warnings()

该文章采用「CC 协议」,转载必须注明作者和本文链接.
分类: Python