requests使用代理ip

import requests
url = "xxxxxxxxxxx"
headers = {
'Referer': 'xxxxxxxxxxx',
'Content-Type': 'xxxxxxxxxxxxxxxxxxx',
'Host': 'xxxxxxxxxxx',
'Connection': 'Keep-Alive',
'Accept-Encoding': 'gzip',
'User-Agent': 'xxxx',
'Cookie': 'xxxxxxxxxxxxxxxx'
}
proxies = {
"http": "113.117.109.236:4537"
}
data_0 = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
data = dict([l.split("=", 1) for l in data_0.split("&")])
response = requests.post(url=url,headers=headers,data=data,proxies=proxies)
print(response.text)

猜你喜欢

转载自www.cnblogs.com/qiaoer1993/p/11317252.html
今日推荐