【问题标题】:Nutch 1.4 and Solr 3.6 - Nutch not crawling 301/302 redirectsNutch 1.4 和 Solr 3.6 - Nutch 不抓取 301/302 重定向
【发布时间】: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)

【问题讨论】:

    标签: solr nutch


    【解决方案1】:

    尝试在网络服务器上运行Wireshark 以查看所提供的确切内容,并在 Nutch 所在的机器上查看所请求的内容。如果他们在同一台服务器上,那就太好了。尝试在捕获后将 HTTP 添加到您的过滤器框中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-22
      • 1970-01-01
      • 1970-01-01
      • 2012-12-02
      • 1970-01-01
      • 2015-08-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多