Unverified HTTPS request is being made to host ‘x.x.x.x‘

错误描述:

        问题:InsecureRequestWarning: Unverified HTTPS request is being made to host 'x.x.x.x'. Adding certificate verification is strongly advised.

        解释:不安全请求警告:正在向主机“x.x.x.x”发出未经验证的HTTPS请求。强烈建议添加证书验证。

问题原因:请求参数添加 verify=False 引起

解决方案:

        import urllib3

        禁用 urllib3 的安全请求警告:

        urllib3.disable_warnings()

        requests.get(url=url,verify=False)

        

你可能感兴趣的:(python)