
代码
ip = get_ip() #ip 是通过 http://ip84.com/dlgn-http 获取的,已用百度测试连通过,格式: http://1.1.1.1:8080 proxies = { 'http' : ip, 'https' : ip } r = requests.get(url, headers=headers, proxies=proxies) 但是去 get 目标网页,仍然显示操作频繁的提示,怎么办?
1 SlipStupig 2016 年 5 月 10 日 考虑 user-agent 头 x-forward-for 头,因为有些代理是透明代理会出卖你的 |
2 linsun84 2016 年 5 月 11 日 x-forward-for 也不一定,不同代理服务器的设置都不一样,头也不同, 尤其是公开的 proxy list 上来的。 我的建议是你自己弄个服务器,先提交给自己看看 HTTP 头上有没有啥特殊的东西,再决定用不用。 |