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)

 

posted @ 2018-11-01 21:25  zhangdingqu  阅读(237)  评论(0编辑  收藏  举报