这是与我的问题最接近的问题,但在我看来并没有得到很好的回答:
我正在寻找#1 的答案:
您应该每秒执行多少个请求来进行抓取?
现在我从链接队列中提取。每个被抓取的网站都有自己的线程,并在请求之间休眠 1 秒。我要求进行 gzip 压缩以节省带宽。
这有标准吗?当然,所有大型搜索引擎在这方面都有一套遵循的准则。
最佳答案
wikipedia article on web crawling有一些关于其他人正在做什么的信息:
Cho[22] uses 10 seconds as an interval for accesses, and the WIRE crawler [28] uses 15 seconds as the default. The MercatorWeb crawler follows an adaptive politeness policy: if it took t seconds to download a document from a given server, the crawler waits for 10t seconds before downloading the next page.[29] Dill et al. [30] use 1 second.
我通常会尝试 5 秒,并带有一点随机性,这样看起来就不那么可疑了。
关于screen-scraping - 抓取网站的请求/第二标准是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2936790/