python - 爬虫抓取数据页一直返回HTTP code 417
黄舟
黄舟 2017-04-17 16:46:03
0
2
604

同一份代码在本地测试请求数据页返回200,

但是在线上之前请求的步骤都可以成功请求到,到请求数据页这步一直返回417

用Advanced REST client在本地模拟这段请求也是可以通过的

查了一下原因,有可能是服务器被识别被封了,如果是这样请问如何解决?谢谢

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
大家讲道理

Two points are very important for crawlers. Control the frequency of crawling and use an agent to crawl. It doesn’t matter if it is slower. The goal is to be long-lasting and effective.

PHPzhong

It is very likely that the server has been blocked due to collecting too much data, so you can only use HTTP proxy

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!