- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试设置一个小型 Android 应用程序,它使用 Goose 库从网页中提取内容。由于该库是用 Scala 编写的,我使用的是我找到的 .jar here .问题是,当我尝试从页面中提取内容时,它什么也没有返回。我使用我需要的 URL 成功创建了一个 Article
对象,但是该对象的值(标题、域、topImage 等)都是 null
。我尝试使用不同的 url,以查看问题是否与单个网站有关,但似乎并非如此。
我用来设置 Goose
实例的代码是这样的:
gooseDir = context.getCacheDir();
Configuration config = new Configuration();
config.setLocalStoragePath(gooseDir.getAbsolutePath());
Goose goose = new Goose(config);
然后我像这样创建 Article
实例:
Article article = goose.extractContent(url);
有什么建议吗?
最佳答案
实际上,由于不兼容,您无法在 Android 上使用 Goose 库,但您可以使用我的 Android 版本:https://github.com/milosmns/goose
它的功能与 Goose 几乎相同,只是在 Android 上运行良好。
关于Java Goose 不在 Android 上提取内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24978300/
我正在使用 Python Goose。您可以在 this link 中找到它 我想提取发布日期,但是当我运行: g = Goose() entity = g.extract(url="mylink")
我正在尝试从新闻机构抓取文章,但我不知道如何使用 python-goose 获取文章的作者。我已经阅读了文档、源代码并搜索了 google。 from goose import Goose def g
我正在尝试设置一个小型 Android 应用程序,它使用 Goose 库从网页中提取内容。由于该库是用 Scala 编写的,我使用的是我找到的 .jar here .问题是,当我尝试从页面中提取内容时
我认为我的 _holder 和/或 _gooseAction 是 null....以下是 _holder 所在的相关代码/类 和 _gooseAction 被实例化: Goose.java publi
我正在使用 python goose extractor,但 mashable.com 和 usatoday.com 上的每篇文章都失败了。有人可以建议解决该问题吗? 对于 usatoday.com
我正在尝试在 virtualenv 中正确设置 python-goose。 更新:我对 python 进行了核攻击,并按照概述 here 开始进行全新安装。 . 我关注了 python-goose i
默认goose go migration 准备了一个提供*sql.Tx的函数: A transaction is provided, rather than the DB instance direc
我正在尝试使用 python goose extractor 从《纽约时报》中提取文章。 我尝试过使用标准的 url 检索方式: g.extract(url=url) 但是这会产生一个空字符串。所以我
我目前正在学习用于 Web 编程的 Golang,现在我将继续学习数据库、Rest API 和 Golang 中的测试。 现在我遇到了 Goose 的问题 数据库迁移和 Go 测试 集成。 我想将 g
我试图使用 https://www.openshift.com/blogs/day-16-goose-extractor-an-article-extractor-that-just-works 上的
在为此度过了非常令人沮丧且毫无成效的一天之后,我在这里发帖寻求帮助。 我正在使用以未知方式启动网络连接的第三方库(但我知道它是非托管库的托管包装器)。它通过调用事件让您了解连接状态 StatusCha
goose 是帮助我运行所有 *sql 文件并在数据库中运行查询的迁移工具。我想在我的 api 服务的 docker 容器中使用此工具自动执行迁移(创建表和其他内容)。问题是当 docker 运行命令
我是一名优秀的程序员,十分优秀!