RSSHub/lib
uuwor 6dd5106441
feat(route): A new routing (cdrw.ts) has been created (#18786)
* 为jwgg.ts添加了部分注释;新建了路由tzggcdunews.ts

* Update jwgg.ts

Indentation has been added after the comments '//' or '/*'

* Update tzggcdunews.ts

Indentation has been added after the comments '//' or '/*'

* Update jwgg.ts

Adjusted Code format

* Update jwgg.ts

完整的 URL:在 url 字段中添加了协议部分(https://)。
选择器修正:直接在 title 中查找 <a> 标签而不是 tr.odd a,这减少了选择器的复杂度。
日期匹配检查:加入了对 dateMatch 的检查,以防止运行时错误。
使用模板字符串:在构建 link 时使用模板字符串,使代码更易读。
过滤无发布日期的项目:在返回结果时,过滤掉那些没有发布日期的项,以确保输出的数据质量。

* 重写tzggcdunews.ts;还原jwgg.ts

* Update lib/routes/cdu/tzggcdunews.ts

* Create news.ts

成大新闻

* Update news.ts

主要修复点
列表项选择器修正:

原代码使用$('a[title]')选择器不够精确

改为使用$('ul.ul-mzw-litpic-a2 li a.con')更精确地定位新闻条目

日期解析改进:

保持原有的两种日期格式处理逻辑

确保日期解析正确并转换为UTC+8时区

链接处理:

正确处理相对路径链接,使用new URL(link, rootUrl).href构建完整URL

标题提取:

从.tit元素中提取标题,而不是依赖title属性

详情页内容提取:

使用.v_news_content选择器获取正文内容

移除页脚等无关元素

RSS标题生成:

从页面标题和分类标题组合生成更有意义的RSS标题

错误处理:

添加了适当的错误处理逻辑,确保在元素不存在时不会报错

* Update news.ts

路由索引

* Create cdrw.ts

增添成大人物订阅

* Delete lib/routes/cdu/news.ts

DELETE NEWS.TS
2025-04-08 01:13:46 +08:00
..
api chore(deps): bump @scalar/hono-api-reference from 0.7.5 to 0.8.0 (#18790) 2025-04-07 22:28:50 +08:00
assets
errors
middleware
routes feat(route): A new routing (cdrw.ts) has been created (#18786) 2025-04-08 01:13:46 +08:00
routes-deprecated feat(route): recover psnine (#18760) 2025-04-03 02:41:19 +08:00
utils chore(deps): bump the opentelemetry group with 5 updates (#18637) 2025-03-25 18:54:32 +08:00
views
app.test.ts
app.tsx
config.test.ts
config.ts feat(route): add route Gelbooru (#18320) 2025-03-18 09:58:49 +08:00
index.ts
pkg.test.ts
pkg.ts
registry.test.ts
registry.ts fix(registry): Prioritize route registration based on specificity (#18002) 2025-02-20 04:17:50 +08:00
router.js feat(route): recover psnine (#18760) 2025-04-03 02:41:19 +08:00
routes.test.ts
setup.test.ts
types.ts