我需要从网页中提取主要的新闻内容。我在互联网上搜索并找到了一个名为Boilerpipe的http://boilerpipe-web.appspot.com/,但我找不到任何使用Boilerpipe.Can的java实现。有人告诉我如何在Java中使用BoilerPipe来提取新闻内容,或者给我一些java实现的链接,这些实现利用BoilerPipe来从新闻网页中提取内容?
发布于 2012-06-22 21:27:32
也许我的回答太迟了。但这很简单。
URL url = new URL("http://www.nydailynews.com/sports/baseball");
ArticleExtractor ae = new ArticleExtractor();
String content = ae.getText(url); // this contains the final text发布于 2016-03-05 19:41:20
很简单,假设您需要提取以下URL
只要使用我的boilerpipe替代Web API HERE,我的服务是基于BoilerPipe的,我开发这个是因为在原始application..you中获得超额配额错误,可以选择以JSON格式返回结果,只需在您的应用程序中使用它。
诚挚的问候
https://stackoverflow.com/questions/10065560
复制相似问题