Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to extract the news detail page? 新闻详情页怎么提取? #19

Open
annian101 opened this issue Mar 28, 2024 · 10 comments
Open
Labels
good first issue Good for newcomers wontfix This will not be worked on

Comments

@annian101
Copy link

请问一下新闻详情页怎么提取?

@platonai
Copy link
Owner

platonai commented Apr 5, 2024

val url = "https://www.eeo.com.cn/2024/0330/648712.shtml"
val session = ScentContexts.createSession()
val document = session.harvestArticle(url, session.options())

println(document.contentTitle)
println(document.textContent)

eeo.com.cn crawler

image

@platonai
Copy link
Owner

platonai commented Apr 5, 2024

If you need a open source solution, use the code below:

    fun harvestArticle(page: WebPage): TextDocument {
        return SAXInput().parse(page.baseUrl, page.contentAsSaxInputSource).also { ChineseNewsExtractor().process(it) }
    }

ChineseNewsExtractor is implemented in PulsarRPA.

@platonai platonai added good first issue Good for newcomers wontfix This will not be worked on labels Apr 5, 2024
@platonai platonai changed the title 请问一下新闻详情页怎么提取? How to extract the news detail page? 新闻详情页怎么提取? Apr 5, 2024
@annian101
Copy link
Author

val url = "https://www.eeo.com.cn/2024/0330/648712.shtml"
val session = ScentContexts.createSession()
val document = session.harvestArticle(url, session.options())

println(document.contentTitle)
println(document.textContent)

eeo.com.cn爬虫

图像

请问您这个是新闻类网站通用的吗?我看您代码目录里有分百度新闻网站、eeo新闻网站这些等等,如果我应用于这些网站之外的网站进行详情页获取,是不是还能获取到?

@annian101
Copy link
Author

如果您需要开源解决方案,请使用以下代码:

    fun harvestArticle(page: WebPage): TextDocument {
        return SAXInput().parse(page.baseUrl, page.contentAsSaxInputSource).also { ChineseNewsExtractor().process(it) }
    }

ChineseNewsExtractor在 PulsarRPA 中实现。

还有大佬,请问下Exotic可以提取详情页吗?

@ZhujingJava
Copy link

val url = "https://www.eeo.com.cn/2024/0330/648712.shtml"
val session = ScentContexts.createSession()
val document = session.harvestArticle(url, session.options())

println(document.contentTitle)
println(document.textContent)

eeo.com.cn爬虫
图像

请问您这个是新闻类网站通用的吗?我看您代码目录里有分百度新闻网站、eeo新闻网站这些等等,如果我应用于这些网站之外的网站进行详情页获取,是不是还能获取到?

不同的网站元素结构不同,每家公司网站都需要单独编写逻辑,比如amazon,zhihu,jd等等。

@platonai
Copy link
Owner

如果您需要开源解决方案,请使用以下代码:

    fun harvestArticle(page: WebPage): TextDocument {
        return SAXInput().parse(page.baseUrl, page.contentAsSaxInputSource).also { ChineseNewsExtractor().process(it) }
    }

ChineseNewsExtractor在 PulsarRPA 中实现。

还有大佬,请问下Exotic可以提取详情页吗?

项目主页 README 有介绍。

更多信息:

https://www.bilibili.com/video/BV1qV411R7Xq/
这个视频介绍了我们的 AI 技术如何准确理解网页上的每一个字段,并且将网页转变为结构化数据或者Excel表格。使用无监督学习+监督学习进行网页数据提取,我们将网页数据提取的人效提升了1000倍以上,提升了数据提取准确率,降低了人员技能要求,同时也不再需要频繁维护数据提取规则。

http://platonic.fun/i/ai?url=aHR0cHM6Ly93d3cuaHVhLmNvbS9tZWlndWkv
这是 AI 技术准确理解并提取网页字段的实时演示。

https://www.bilibili.com/video/BV1Zi4y1h7aq/

@platonai
Copy link
Owner

不同的网站元素结构不同,每家公司网站都需要单独编写逻辑,比如amazon,zhihu,jd等等。

项目主页 README 有介绍。

更多信息:

https://www.bilibili.com/video/BV1qV411R7Xq/
这个视频介绍了我们的 AI 技术如何准确理解网页上的每一个字段,并且将网页转变为结构化数据或者Excel表格。使用无监督学习+监督学习进行网页数据提取,我们将网页数据提取的人效提升了1000倍以上,提升了数据提取准确率,降低了人员技能要求,同时也不再需要频繁维护数据提取规则。

http://platonic.fun/i/ai?url=aHR0cHM6Ly93d3cuaHVhLmNvbS9tZWlndWkv
这是 AI 技术准确理解并提取网页字段的实时演示。

https://www.bilibili.com/video/BV1Zi4y1h7aq/

@xieliaing
Copy link

你好,联系贵公司电子邮箱,但是没有回复,请问如何接洽。

@galaxyeye
Copy link
Collaborator

galaxyeye commented Aug 18, 2024 via email

@xieliaing
Copy link

xieliaing commented Aug 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants