【发布时间】:2014-09-12 14:18:11
【问题描述】:
我遇到了一个问题,即通过重定向抓取的初始页面未被抓取或编入索引。
我将 http.redirect.max 属性设置为 5,我尝试了值 0、1 和 3。
<property>
<name>http.redirect.max</name>
<value>5</value>
<description>The maximum number of redirects the fetcher will follow when
trying to fetch a page. If set to negative or 0, fetcher won't immediately
follow redirected URLs, instead it will record them for later fetching.
</description>
</property>
我还尝试清除 regex-urlfilter.txt 和 crawl-urlfilter.txt 中的大部分内容。除了被抓取的网站,这是这些文件中唯一的其他参数。
# skip file: ftp: and 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|PDF|pdf|js|JS|swf|SWF|ashx|css|CSS|wmv|WMV)$
此外,Nutch 似乎只抓取和推送具有查询字符串参数的页面。
查看输出时。
http://example.com/build Version: 7
Status: 4 (db_redir_temp)
Fetch time: Fri Sep 12 00:32:33 EDT 2014
Modified time: Wed Dec 31 19:00:00 EST 1969
Retries since fetch: 0
Retry interval: 2700 seconds (0 days)
Score: 0.04620983
Signature: null
Metadata: _pst_: temp_moved(13), lastModified=0: http://example.com/build/
默认 IIS 重定向发生抛出 302 以添加尾部斜杠。我已确保此斜线已添加到所有页面上。所以不确定为什么会被重定向。
更多信息,这里有一些我尝试过的参数。
depth=5 (tried 1-10)
threads=30 (tried 1 - 30)
adddays=7 (tried 0, 7)
topN=500 (tried 500, 1000)
【问题讨论】: