我有特定主題的小種子。我希望Nutch只應遵循預期涉及相關主題的那些外部鏈接(它可能僅僅是一種啓發式)。我該怎麼做。如果我必須寫一些插件,那麼擴展點應該是什麼。有沒有可用的例子。在Apache Nutch 2.3.1中選取的外部URL獲取
0
A
回答
0
對於您的特殊情況,您可以嘗試使用插件,您可以在NUTCH-2038中找到關於它的更多信息。請記住,這是以某種方式與您的用例保持一致的某種常規解決方案提供的。當然,現實可能會有所不同。
不過,如果您能想出一個很好的啓發式方法來檢測鏈接是否是一個很好的候選者,那麼您可以在HtmlParseFilter
中實現該鏈接,然後您可以選擇應該返回哪些鏈接。請記住,在這個階段,您可能只有關於可能的outlink的唯一信息是URL。
0
設置你的Nutch的配置Nutch的-default.xml中
<property>
<name>db.ignore.internal.links</name>
<value>true</value>
<description>If true, when adding new links to a page, links from
the same host are ignored. This is an effective way to limit the
size of the link database, keeping only the highest quality
links.
</description>
</property>
<property>
<name>db.ignore.external.links</name>
<value>false</value>
<description>If true, outlinks leading from a page to external hosts
will be ignored. This is an effective way to limit the crawl to include
only initially injected hosts, without creating complex URLFilters.
</description>
</property>
相關問題
- 1. Apache Nutch 2.3.1讀取錯誤
- 2. Nutch 2.3.1僅抓取種子URL
- 3. Apache Nutch 2.3.1擴展點在獲取時間
- 4. Apache Nutch 2.3.1遠程命令失敗
- 5. Apache Nutch 2.3.1插件不工作
- 6. apache nutch不抓取網站
- 7. 從外部url的iframe獲取內容
- 8. Nutch的1.13獲取URL的失敗:org.apache.nutch.protocol.ProtocolNotFound:找不到URL = HTTP
- 9. 如何讓Apache Nutch的抓取永遠
- 10. Solr 6和Nutch 2.3.1集成
- 11. Apache Nutch步驟說明
- 12. 如何讓apache nutch永久爬取
- 13. Apache Nutch重新啓動抓取
- 14. jQuery,獲取外部函數選擇器
- 15. 從JavaScript中的外部url中獲取JSON對象
- 16. 獲取URL的部分window.location
- 17. 在Thymeleaf中獲取URL部件
- 18. 從外部URL中提取文本
- 19. 從外部文件中讀取android URL
- 20. 如何從jQuery中的外部URL獲取數據?
- 21. 在Java中獲取'外部'IP地址
- 22. 獲取主URL部分
- 23. 提取外部圖像的URL
- 24. 擷取外部URL的圖像
- 25. Android獲取外部IP
- 26. ReactJS獲取外部Json
- 27. Swift - 獲取iBeacon - 外部類
- 28. 獲取外部菜單onOptionsItemSelected
- 29. 獲取外部文件
- 30. Angurlarjs獲取外部服務