【发布时间】:2011-07-11 10:48:01
【问题描述】:
我正在使用 nutch 1.2。当我像这样运行抓取命令时:
bin/nutch crawl urls -dir crawl -depth 2 -topN 1000
Injector: starting at 2011-07-11 12:18:37
Injector: crawlDb: crawl/crawldb
Injector: urlDir: urls
Injector: Converting injected urls to crawl db entries.
Injector: Merging injected urls into crawl db.
Injector: finished at 2011-07-11 12:18:44, elapsed: 00:00:07
Generator: starting at 2011-07-11 12:18:45
Generator: Selecting best-scoring urls due for fetch.
Generator: filtering: true
Generator: normalizing: true
Generator: topN: 1000
Generator: jobtracker is 'local', generating exactly one partition.
Generator: 0 records selected for fetching, exiting ...
Stopping at depth=0 - no more URLs to fetch.
**No URLs to fetch - check your seed list and URL filters.**
crawl finished: crawl
问题在于它一直在抱怨:没有要获取的 URL - 检查您的种子列表和 URL 过滤器。
我有一个要在 nutch_root/urls/nutch 文件下抓取的 url 列表。我的 crawl-urlfilter.txt 也设置好了。
为什么它会抱怨我的网址列表和过滤器?它以前从未这样做过。
这是我的 crawl-urlfilter.txt
# skip file:, ftp:, & mailto: urls
-^(file|ftp|mailto):
# skip image and other suffixes we can't yet parse
-\.(gif|GIF|jpg|JPG|png|PNG|ico|ICO|css|sit|eps|wmf|zip|ppt|mpg|xls|gz|rpm|tgz|mov|MOV|exe|jpeg|JPEG|bmp|BMP)$
# skip URLs containing certain characters as probable queries, etc.
# skip URLs with slash-delimited segment that repeats 3+ times, to break loops
-.*(/[^/]+)/[^/]+\1/[^/]+\1/
# accept hosts in MY.DOMAIN.NAME
+^http://([a-z0-9]*\.)*152.111.1.87/
+^http://([a-z0-9]*\.)*152.111.1.88/
# skip everything else
-.
【问题讨论】:
-
也许添加您的 crawl-urlfilter.txt 和您的 seed.url 文件......过滤器可能实际上正在过滤您的种子
-
你能发布你的 crawl-urlfilter.txt 吗?