1. 程式人生 > >Python requests代理

Python requests代理

self.ip=requests.get('http:ip獲取')
self.ip=(self.ip.text).replace('\r','').replace('\n','')
print('IP是', self.ip)
self.proxies={'https':self.ip}

response=requests.get(url,headers=self.headers,proxies=self.proxies)