01开启Fiddler
开启Fiddler>>Tools>>Options,设置端口号为8888

02post请求设置代理
通过以下代理的设置,就可以通过Fiddler抓取到Python发出的http/https请求,对比正确的请求的请求数据,并且不报错。
import requests
# 设置代理
proxies = {
"http": "http://127.0.0.1:8888",
"https": "http://127.0.0.1:8888"
}
url = "xxxx"
header = {}
data = {}
r = requests.post(url=url,headers=header,json=data,verify=False,proxies=proxies)
如果已开启Fiddler,且没有设置代理,执行Python脚本的时候会报以下错误:
requests.exceptions.SSLError: HTTPSConnectionPool(host='', port=):
Max retries exceeded with url: xxxxx
(Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong
上一条:Telerik Reporting, Fiddler和JustMock通过R1 2023发布为您提供更多
下一条:在ChemDraw中绘制动物细胞分裂示意图