【发布时间】:2018-04-07 16:55:55
【问题描述】:
Requests 没有使用我传递给它的代理。我正在使用的 url 上的站点显示请求来自哪个 ip - 它始终是我的 ip 而不是代理 ip。我从 sslproxies.org 获取我的代理 ip,这些代理 ip 应该是匿名的。
url = 'http://www.lagado.com/proxy-test'
proxies = {'http': 'x.x.x.x:xxxx'}
headers = {'User-Agent': 'Mozilla...etc'}
res = requests.get(url, proxies=proxies, headers=headers)
是否需要使用某些标头或需要配置其他内容,以便对服务器隐藏我的 ip?
【问题讨论】:
标签: python python-3.x proxy network-programming python-requests