【问题标题】:how to make nutch crawl file system?如何制作nutch爬取文件系统?
【发布时间】:2009-06-02 19:44:23
【问题描述】:

不基于http,

比如http://localhost:81等等,

而是直接爬取本地文件系统上的某个目录,

有什么办法吗?

【问题讨论】:

    标签: filesystems nutch web-crawler


    【解决方案1】:

    来自 Nutch Wiki:

    如何索引我的本地文件系统?

    http://wiki.apache.org/nutch/FAQ#head-c721b23b43b15885f5ea7d8da62c1c40a37878e6

    1) crawl-urlfilter.txt 需要更改以允许 file: URLs 而不是 http: 的,否则它要么不会索引任何内容,要么会从您的磁盘跳到网站上。 更改此行:

      -^(file|ftp|mailto|https):
    
      to this:
    
      -^(http|ftp|mailto|https):
    

    2) crawl-urlfilter.txt 的底部可能有拒绝某些 URL 的规则。如果它有这个片段可能没问题:

      # accept anything else +.*
    

    3) 我更改了我的 nutch.xml 以包含以下内容:

    <Parameter override="false" name="plugin.includes" value="protocol-file|protocol-http|urlfilter-regex|parse-(msword|pdf|text|html|js)|index-(basic|anchor)|query-(basic|site|url)|response-(json|xml)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)"/>
    

    【讨论】:

    • regex-urlfilter.txt 需要更改
    【解决方案2】:

    nutch 提供了 Intranet 抓取功能。你可以阅读详情here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-29
      • 2020-05-21
      • 1970-01-01
      相关资源
      最近更新 更多