繁体   English   中英

如何使用 Boilerpipe 从 web 页面中提取新闻内容?

[英]How to extract news content from a web page using Boilerpipe?

我需要从 web 页面中提取主要新闻内容。我在 inte.net 上搜索并找到了一个名为 Boilerpipe 的 api 可免费用于该目的http://boilerpipe-web.appspot.com/但我无法找到任何java 中使用 Boilerpipe 的实现。谁能告诉我如何使用 Java 中的 Boilerpipe 提取新闻内容,或者给我一些指向 java 中使用 Boilerpipe 从新闻 web 页面中提取内容的实现的链接?

可能是我的回答太迟了。 但这很简单。

 URL url = new URL("http://www.nydailynews.com/sports/baseball"); 
 ArticleExtractor ae = new ArticleExtractor();
 String content = ae.getText(url);  // this contains the final text

简单吧,假设你需要提取这个URL

只需使用我的 BoilerPipe Alternative Web API HERE ,我的服务基于 boilerpipe,我开发这个是因为在原始应用程序中出现 overquota 错误。你可以选择在 JSON 中取回结果,只需在你的应用程序中使用它。 .

最好的祝福

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM