python3 https 报错:InsecureRequestWarning: Unverified HTTPS request is being made
作者:高景洋 日期:2020-03-03 11:19:52 浏览次数:3881
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)
本文永久性链接:
<a href="http://r4.com.cn/art134.aspx">python3 https 报错:InsecureRequestWarning: Unverified HTTPS request is being made</a>
<a href="http://r4.com.cn/art134.aspx">python3 https 报错:InsecureRequestWarning: Unverified HTTPS request is being made</a>
当前header:Host: r4.com.cn
X-Host1: r4.com.cn
X-Host2: r4.com.cn
X-Host3: 127.0.0.1:8080
X-Forwarded-For: 3.144.8.159
X-Real-Ip: 3.144.8.159
X-Domain: r4.com.cn
X-Request: GET /art134.aspx HTTP/1.1
X-Request-Uri: /art134.aspx
Connection: close
Accept: */*
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Accept-Encoding: gzip, br, zstd, deflate