python - requests.get使用代理能转发http头部吗
巴扎黑
巴扎黑 2017-04-18 09:52:20
0
1
292

需要爬取的网页需要登陆才可以获取,但是又对爬取ip有限制,所以我想要使用代理ip进行爬取;
但是我在request的session中使用proxy后无法爬取到有信息的网页,所以猜想可能是代理地址没有进行头部转发,这里想请教一下大家!

巴扎黑
巴扎黑

reply all (1)
迷茫

If the IP is grabbed from a certain proxy IP website, most of it is unavailable. The available ones also affect the stability of the program due to timeout and other reasons. Requests will automatically help you process the HTTP header. No. There is a problem as you suspect. It should be a problem with your proxy IP. Take a look at my proxy IP

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!