httpx请求
real_proxy = {
"all://": 'http://{}'.format(the_ip)
}
with httpx.Client(proxies=real_proxy, http2=True, verify=False) as client: res = client.post(url, data=pdata, headers=headers, cookies=cookie_dict, follow_redirects=False, timeout=49) locationUrl = res.headers['Location'] cookie_dict.update(res.cookies) res = client.get(locationUrl, headers=self.h3, cookies=cookie_dict, timeout=49)