标签:err ble mic windows gecko erro tps header blog
一、SSL问题
1.不启用fiddler,直接发https请求,不会有SSL问题(也就是说不想看到SSL问题,关掉fiddler就行)
2.启动fiddler抓包,会出现这个错误:requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
二、verify参数设置
1.Requests的请求默认verify=True
2.如果你将 verify设置为 False,Requests 也能忽略对 SSL 证书的验证
3.但是依然会出现两行Warning,可以不用管
三、忽略Warning
1.有些小伙伴有强迫症看到红色的心里就发慌,这里加两行代码可以忽略掉警告,眼不见为净!
2.参考代码:用红色的几段代码就可以搞定这个问题!
# coding:utf-8 import requests # 禁用安全请求警告 from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) url = "https://passport.cnblogs.com/user/signin" headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0" } r = requests.get(url, headers=headers, verify=False) print(r.status_code)
pycharm fiddler requests.exceptions.SSLError
标签:err ble mic windows gecko erro tps header blog
原文地址:https://www.cnblogs.com/itfat/p/9374739.html