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)
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)