2014-09-12 78 views
2

我遇到了一个问题,其中通过重定向抓取的初始页面没有被抓取或编入索引。Nutch 1.4和Solr 3.6 - Nutch没有抓取301/302重定向

我有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> 

我还试图清除掉大部分的什么是在正则表达式-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) 

回答

0

尝试在Web服务器上运行Wireshark看到的是被服务到底是什么,并在机器上的Nutch是看到真实所请求的内容。如果他们在同一台服务器上,太棒了。尝试一下并在捕获之后将HTTP添加到您的过滤器框中。