如果使用requests时设置verify=False
response = requests.request("POST",
url,
headers=headers,
data=payload,
verify=False)
就会报错 Unverified HTTPS
InsecureRequestWarning: Unverified HTTPS request is being made to host 'xxx.xxx.xxx.xxx'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
想关掉这个警告就在前面加上神秘代码
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
response = requests.request("POST",
url,
headers=headers,
data=payload,
verify=False)
再运行就没事了,当然最好还是配置好ssl,别让他报错