route/telegram/channel:
Since 2024/4/20, t.me/s/ mistakenly have every '&' in **hyperlinks**
replaced by '&'. The characteristic of a hyperlink is [onclick]
(pop-up confirmation), which is not present in ordinary links. This is a
workaround to fix the issue until Telegram fixes it.
route/wechat/tgchannel:
Since 2024/4/20, t.me/s/ mistakenly have every '&' in **hyperlinks**
replaced by '&'. wechat-mp will take care of this, so no need to fix
it here. However, once the bug is eventually fixed, all guid will be
changed again. Considering that this is almost certain to happen, let's
break guid consistency now by using normalized URL from wechat-mp as
guid to avoid similar issues in the future.
Signed-off-by: Rongrong <i@rong.moe>
* 添加了新的RSSHub路由,支持Radar ,以及修改了对应的文档
新增了针对南昌大学教务处通知的RSSHub路由,支持Radar。
同时修改了RSShub文档
* Removed redundant settings and fixed the year.
删去了多余的代码,更正了正确的年份
* 修改radar.js来修复问题
原来的radar无法正确识别网站,原来是url错误了,现在已经更改
* Update jwc.js
* Refactor jwc.ts and remove unused files
* Update dependencies
* Refactor jwc.ts and remove unused files
* Refactor jwc.ts and update newsDate calculation
* Optimized date retrieval code: consolidated year and month retrieval into a single line
* style: auto format
* Refactor jwc.ts: Consolidate date retrieval code
* Revert "Refactor jwc.ts: Consolidate date retrieval code"
This reverts commit 353f70745cff2eff950d115a518b9f5750a4b1c7.
* Revert "Optimized date retrieval code: consolidated year and month retrieval into a single line"
This reverts commit e38bc31ab412b79842e74b8c86a1fe39277e2ca4.
* Refactor jwc.ts: Consolidate date retrieval code and optimize newsDate calculation
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* feat: Enhance link resolution and content selection
- Update utils/index.ts to check for non-empty redirect URLs before assignment.
- Modify yjs.ts and ai.ts to select content using a higher-level ID '#vsb_content' for more comprehensive data extraction.
- Ensure all relative URLs within content are transformed into absolute URLs to improve link accessibility and reliability in RSS feeds.
* feat(njxzc/utils/index.ts): Enhance link resolution and handle specific access restrictions
- Replace direct string manipulations with conditional checks for 'response.redirectUrls'.
- Implement checks for '.wp_error_msg' to manage content access based on IP restrictions.
- Remove 'replaceAll' function usage to improve handling of relative URLs in 'contentSelector.content'.
- Ensure robust handling of content that can't be directly previewed due to restrictions or missing permissions.
* feat(jou/utils/index): Enhance URL handling and integrate PDF viewing logic
- Replace usage of 'replaceAll' with conditional checks for 'response.redirectUrls' to ensure robust URL handling.
- Add logic to detect embedded PDF scripts in web content, setting descriptions appropriately when PDF content is detected.
- This update aims to improve the system's ability to handle different types of content securely and effectively, particularly enhancing how PDF files are managed within the application.
* feat: Replace got with ofetch in route handlers
- Updated /lib/routes/gxmzu, /lib/routes/jou, and /lib/routes/njxzc to use ofetch instead of got for HTTP requests.
- Adjusted redirection handling logic to align with ofetch's API and behavior.
- Ensured all route handlers now properly handle redirects by checking response status codes instead of relying on redirectUrls array from got.
This change enhances the reliability and maintainability of HTTP request handling across different university library routes by utilizing ofetch, which is more consistent with our current architecture and requirements.
* fix(core/utils/wechat-mp): empty description when request blocked by WAF
Silently falling back to the fallback method would generate empty
description. Fixed by throwing an error when failed to extract
item_show_type from the page.
Some misc warnings are also added to make bug reporting easier.
Signed-off-by: Rongrong <i@rong.moe>
* fix(core/utils/wechat-mp): err msg for unknown page
Signed-off-by: Rongrong <i@rong.moe>
* test(core/utils/wechat-mp): fix coverage
Signed-off-by: Rongrong <i@rong.moe>
* fix(core/utils/wechat-mp): ESLint no-await-in-loop
Signed-off-by: Rongrong <i@rong.moe>
* fix(core/utils/wechat-mp): normalizeUrl: & -> &
Signed-off-by: Rongrong <i@rong.moe>
* feat(core/utils/wechat-mp): do not prompt raising an issue when blocked
by WAF
Signed-off-by: Rongrong <i@rong.moe>
* feat(core/utils/wechat-mp): recognize deleted page
Signed-off-by: Rongrong <i@rong.moe>
* feat(core/utils/wechat-mp): log when error
Prevent errors from being completely suppressed if the caller catches
them.
Signed-off-by: Rongrong <i@rong.moe>
---------
Signed-off-by: Rongrong <i@rong.moe>
* 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>
* feat(route/mihoyo): enhance miyoushe offical post
1. get full text post rather than abstracts.
2. add post hashtags as rss.item.category.
3. Set appropriate link.
* fix(route/mihoyo): fix __dirname is not defined error