【问题标题】:Apache Nutch not adding internal links in a web page to fetchlistApache Nutch 未将网页中的内部链接添加到 fetchlist
【发布时间】:2023-03-13 00:10:01
【问题描述】:

我正在使用 Apache Nutch 1.7,我在使用 URL http://www.ebay.com/sch/allcategories/all-categories/?_rdc=1 作为种子 URL 进行爬网时遇到了这个问题,这个 URL 在页面中存在许多内部链接,并且还有许多指向其他域的外部链接,我是只对内部链接感兴趣。

但是,当这个页面被抓取时,它的内部链接不会被添加到下一轮抓取中(我给出了 100 的深度)。我已经将 db.ignore.internal.links 设置为 false ,但由于某种原因,内部链接没有被添加到下一轮 fetch 列表中。

另一方面,如果我将 db.ignore.external.links 设置为 false,它会正确地从页面中获取所有外部链接。

这个问题在任何其他领域都不存在,有人能告诉我这个特定页面的问题吗?

我还附上了我正在使用的 nucth-site.xml 供您审核,请告知。

【问题讨论】:

    标签: web-crawler nutch


    【解决方案1】:

    默认过滤器会忽略您的种子网址,因此不会抓取您的页面。

    编辑以下文件:

    conf/automaton-urlfilter.txt

    conf/regex-urlfilter.txt

    替换

    # skip URLs containing certain characters as probable queries, etc.
    -.*[?*!@=].*
    

    # skip URLs containing certain characters as probable queries, etc.
    -.*[*!@].*
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-04
      • 1970-01-01
      • 1970-01-01
      • 2011-05-17
      • 2011-10-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多