forked from DIYgod/RSSHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core/utils/wechat-mp): major rewrite (DIYgod#15276)
* feat(core/utils/wechat-mp): major rewrite * Support more `item_show_type`: `APP_MSG_PAGE`, `VIDEO_SHARE_PAGE`, `AUDIO_SHARE_PAGE`, and `IMG_SHARE_PAGE`. Previously only the first one could be parsed properly. There are still some other known types waiting for live examples for further adaptation. If this is the case, a fallback method will try to generate entries using mostly OpenGraph metadata. Meanwhile, the administrator of self-hosted instances will see warnings in the log, asking them to report the URL as a new live example. Still, `VIDEO_SHARE_PAGE` explicitly uses the fallback method without any warning, as there is no possible approach to generate a video/iframe URL from page metadata. * Show audio and videos in `APP_MSG_PAGE`. However, not all videos can be shown due to the same reason as `VIDEO_SHARE_PAGE`. * Show the location where the article is sent. * Some bugs, mostly due to outdated cheerio selector, are fixed. * Add a new sub-route `wechat-mp` to `/test` to make things easier. * All changes are well-tested. Signed-off-by: Rongrong <i@rong.moe> * style(core/utils/wechat-mp): fix ESLint & CodeQL errors Signed-off-by: Rongrong <i@rong.moe> * style(core/utils/wechat-mp): fix a DeepScan issue Signed-off-by: Rongrong <i@rong.moe> * style(core/utils/wechat-mp): fix ESLint error Another try w/ pre-commit hook disabled. Signed-off-by: Rongrong <i@rong.moe> --------- Signed-off-by: Rongrong <i@rong.moe>
- Loading branch information
1 parent
7feab90
commit a99b35f
Showing
5 changed files
with
852 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.