如何让apache nutch永远爬行

时间:2014-10-20 09:16:31

标签: apache web-crawler nutch

我正在使用apache nutch(2.2.1)进行抓取。如果我想要永远爬行,需要进行哪些更改。完全引导我,因为我对nutch不太熟悉。

1 个答案:

答案 0 :(得分:2)

如果您想永久抓取,以下是您需要的脚本:

#!/bin/bash

./bin/nutch inject urls #urls is the seed data
while [ 1 == 1 ]
do
   ./bin/nutch generate -topN 10000 # 10000 is the number of URLs will be fetch in each crawling round, you can modify it
   ./bin/nutch fetch -all
   ./bin/nutch parse -all
   ./bin/nutch updatedb

done

希望这有帮助

Le Quoc Do

相关问题