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)

 

posted @ 2022-03-15 12:45  AngDH  阅读(73)  评论(0编辑  收藏  举报