如何提高Scrapy的爬行速度? [英] How to increase Scrapy crawling speed?

查看:50
本文介绍了如何提高Scrapy的爬行速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Scrapy 抓取网站并将数据提取到 json 文件,但我发现对于某些网站,抓取工具需要很长时间才能抓取整个网站.

I am using Scrapy to crawl websites and extract data to a json file, but I've found that for some sites the crawler takes ages to crawl the complete website.

我的问题是:我怎样才能最大限度地减少爬行所需的时间?

My question is: How can I minimize the time taken to crawl?

推荐答案

尝试调整 CONCURRENT_ITEMSCONCURRENT_REQUESTSCONCURRENT_REQUESTS_PER_DOMAIN 和其他设置.

Try tuning the CONCURRENT_ITEMS, CONCURRENT_REQUESTS, CONCURRENT_REQUESTS_PER_DOMAIN and other settings.

有关设置的完整列表,请参阅 http://doc.scrapy.org/en/latest/topics/settings.html

For full list of settings, see http://doc.scrapy.org/en/latest/topics/settings.html

这篇关于如何提高Scrapy的爬行速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆