import base64
proxy_ip_port = "123.456.789.10:8888"
proxy_user_pass = "awesome:dude"
request = Request(url, callback=self.parse)
# Set the location of the proxy
request.meta['proxy'] = "http://%s" % proxy_ip_port
# setup basic authentication for the proxy
encoded_user_pass=base64.encodestring(proxy_user_pass)
request.headers['Proxy-Authorization'] = 'Basic ' + encoded_user_pass

 

相关文章:

  • 2021-12-23
  • 2021-04-11
  • 2021-10-01
  • 2021-08-09
  • 2022-01-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-28
  • 2021-09-17
  • 2022-02-18
  • 2021-12-04
  • 2021-04-20
  • 2021-10-23
相关资源
相似解决方案