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

作者:高景洋 日期:2020/03/03 11:19 浏览次数:259

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://www.zhihu.so/art134.aspx">python3 https 报错:InsecureRequestWarning: Unverified HTTPS request is being made</a>
相关文章
友情链接
支付宝打赏(内容对您有帮助的话)
微信交流
知乎编程经验网 - 在工作中总结编程的经验! 备案/许可证编号:鲁ICP备11020152号
QQ:120217215 联系电话:15192695151