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

澎湃新闻图片及视频与正文重复 #13401

Closed
1 task done
dzx-dzx opened this issue Sep 26, 2023 · 3 comments · Fixed by #13404
Closed
1 task done

澎湃新闻图片及视频与正文重复 #13401

dzx-dzx opened this issue Sep 26, 2023 · 3 comments · Fixed by #13404
Labels
Bug Ping: Pinged Count: 1/1 Route: v2 v2 route related RSS bug Something isn't working

Comments

@dzx-dzx
Copy link
Contributor

dzx-dzx commented Sep 26, 2023

路由地址

/thepaper/featured

完整路由地址

/thepaper/featured

相关文档

https://docs.rsshub.app/routes/traditional-media#peng-pai-xin-wen-shou-ye-tou-tiao

预期是什么?

全文获取仅包含正文内容。

实际发生了什么?

正文内图片与视频会被单独提取出来放在前面,而之后的正文部分也有图片与视频。
https://m.thepaper.cn/detail/24747910
Screen Shot 2023-09-26 at 13 30 53

部署

RSSHub 演示 (https://rsshub.app)

部署相关信息

No response

额外信息

在代码中这似乎是故意如此设计的:

if (contentDetail.videos) {
description =
art(path.join(__dirname, 'templates/video_detail.art'), {
// see https://nanmu.me/zh-cn/posts/2020/strange-html-video-tag-behavior-in-wechat/
// for video tag details
videos: contentDetail.videos,
}) + description;
}
if (contentDetail.images) {
description =
art(path.join(__dirname, 'templates/image_detail.art'), {
images: contentDetail.images,
}) + description;
}

这不是重复的 issue

  • 我已经搜索了 现有 issue,以确保该错误尚未被报告。
@dzx-dzx dzx-dzx added the RSS bug Something isn't working label Sep 26, 2023
@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Contributor

Searching for maintainers:

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。
If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake.

@bigfei
Copy link
Contributor

bigfei commented Sep 26, 2023

是故意这么设计的,有些rss软件不会显示media中的图片,而那个时候澎湃新闻的全文也不包括video image,由js动态插入。
目前可能澎湃新闻修改了逻辑,全文的api中也有了相应的内容。
建议增加一个toggle,默认为关闭,即不重复引用Video/image等内容,或者进一步的,智能判断对应的内容是否在description中包括。
欢迎提供PR

dzx-dzx added a commit to dzx-dzx/my-RSSHub that referenced this issue Sep 26, 2023
TonyRL pushed a commit that referenced this issue Sep 27, 2023
…on (#13404)

* 澎湃新闻图片及视频与正文重复
Fixes #13401

* Save cache to different path for each mode.

* Update website/docs/routes/traditional-media.md

* Add text content to full text if the source is of video type.

---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Ping: Pinged Count: 1/1 Route: v2 v2 route related RSS bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants