首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用nutch抓取PDF文档

使用nutch抓取PDF文档
EN

Stack Overflow用户
提问于 2013-08-05 17:35:44
回答 3查看 6.1K关注 0票数 3

我也必须从给定的URL抓取PDF文档...推荐任何工具/API来抓取PDF文档...现在我正在使用nutch抓取,但我不能抓取PDF从给定的URL...should我使用任何插件抓取PDF在nutch?

seed.txt --> http://nutch.apache.org regex-urlfilter.txt->+^http://([a-z0-9]*.)*nutch.apache.org/

提前感谢

EN

回答 3

Stack Overflow用户

发布于 2014-12-30 04:01:23

regex-urlfilter.txt部分中添加“

  • -

”和“

  • -

”在

  • 部分中添加"pdf“

  • 和”

-

  • “。这应该类似于下面的

这个答案来自here。我在Nutch上工作的时候测试过它

代码语言:javascript
运行
复制
<property>


<name>plugin.includes</name>
  <value>protocol-http|urlfilter-regex|parse-(html|tika|text)|index-(basic|anchor)|scoring-opic|urlnormalizer-(pass|regex|basic)</value>
  <description>
    ...
  </description>
</property>
票数 2
EN

Stack Overflow用户

发布于 2016-01-28 12:51:35

我发现即使你使用了tika插件,它仍然不能抓取pdf或任何ms office文件到crawldb中。你需要在nutch-site.xml中的白名单中添加你想要抓取的url,才能得到pdf和任何ms office文件:

代码语言:javascript
运行
复制
<property>
  <name>http.robot.rules.whitelist</name>
  <value>xxx.xxx.xxx.xxx</value>
  <description>Comma separated list of hostnames or IP addresses to ignore 
  robot rules parsing for. Use with care and only if you are explicitly
  allowed by the site owner to ignore the site's robots.txt!
  </description>
</property>
票数 1
EN

Stack Overflow用户

发布于 2013-08-21 14:49:47

使用Nutch的parse-tika插件。纯文本、XML、OpenDocument (OpenOffice.org)、Microsoft Office (Word、Excel、Powerpoint)、PDF、RTF、MP3 (ID3标签)都是由Tika插件解析的

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18054889

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档