当前位置:首页 - Python

python3 https 报错:InsecureRequestWarning: Unverified HTTPS request is being made

作者:高景洋 日期:2020-03-03 11:19:52 浏览次数:2865

python3 https 请求 报以下错误:


/usr/local/python3/lib/python3.7/site-packages/urllib3/connectionpool.py:1004: 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,


解决办法:


import urllib3
在请求请添加 如下一行:



urllib3.disable_warnings()
response = requests.get(download_url, headers=headers, proxies=proxies, timeout=timeout, allow_redirects=allow_redirects, verify=False)


urllib3.disable.warnings(),即可 访问https时移出ssl认证


本文永久性链接:
<a href="http://r4.com.cn/art134.aspx">python3 https 报错:InsecureRequestWarning: Unverified HTTPS request is being made</a>
apple手机报价