Nutch 2.3.1没有抓取没有域名的内部链接

时间:2017-03-13 20:50:40

标签: nutch

我有一个nutch设置可以同时抓取许多网站,但是对于一个网站而言,由于内部链接如href =“没有域名的链接”,nutch无法看到这些网址, 以下是荷兰网站

conf/regex-urlfilter.txt
# skip file: ftp: and mailto: urls
-^(file|ftp|mailto):

# skip image and other suffixes we can't yet parse
# for a more extensive coverage use the urlfilter-suffix plugin
-\.(gif|GIF|jpg|JPG|png|PNG|ico|ICO|css|CSS|sit|SIT|eps|EPS|wmf|WMF|zip|ZIP|ppt|PPT|mpg|MPG|xls|XLS|gz|GZ|rpm|RPM|tgz|TGZ|mov|MOV|exe|EXE|jpeg|JPEG|bmp|BMP|js|JS)$

# 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 anything else 
+.

我更改了默认的nutch-defaults.conf

<property>
<name>db.ignore.internal.links</name>
<value>true</value> <!-- do not leave the seeded domains (optional) -->
</property>

有人可以告诉我该怎么做。

1 个答案:

答案 0 :(得分:0)

我有没有域名的链接,它们是同一网站示例的链接,假设我们有href =&#39; www.site.com/linktext' ;,在我的情况下,我有href = &#39; linktext的&#39 ;. Nutch根本没有看到这些链接,它只检测那些包含域名的链接。