RSSHub/lib
Jiakai Gu 39aa7af02c
fix(route): harden njxzc, gxmzu and jou routes (#22435)
* fix(route): harden njxzc, gxmzu and jou routes

- parse all observed date formats (ISO, slash, Chinese with optional
  time) instead of a fixed YYYY-MM-DD pattern
- fall back to list data when an article page fails or lacks content,
  instead of crashing the whole feed on cheerio load(null)
- skip content fetching for off-site links (e.g. WeChat posts)
- only override title/pubDate when found on the detail page
- resolve relative links and images against the article URL
- deduplicate the list/detail scaffold into per-namespace utils
- remove dead response.status checks, unused ctx params and noise
  comments; fix namespace URLs and antiCrawler flags

* refactor(route): address review feedback for gxmzu, jou and njxzc

- translate code comments to English (AGENTS.md rule 53)
- select the date cell via $(selector, context) instead of .find(selector)
  to avoid unicorn/no-array-callback-reference false positives

* refactor(route): simplify gxmzu, jou and njxzc per review

- drop the unused type exports, unnecessary .first() calls and the
  unreachable no-content early returns
- restore the original selector object order in gxmzu/jou call sites
- gxmzu/jou: drop try-catch in resolveArticles (no failing article
  observed); keep the same-host guard for off-site list entries
- njxzc: drop the same-host guard (list links are same-host /_redirect
  URLs); keep try-catch for redirects to intranet-only subdomains
- gxmzu/lib: read the link text directly (library rows have no title
  attribute)

* refactor(route): drop jou host guard and njxzc intranet handling

- jou: remove the same-host guard — no off-site rows on the current
  first pages, which are all the route reads
- njxzc: remove the intranet-notice branch and the try-catch — every
  article on the current first pages loads fine from off-campus; drop
  the now-stale route descriptions as well

---------

Co-authored-by: real-jiakai <real.jiakai@gmail.com>
2026-07-20 13:08:00 +08:00
..
api chore(deps-dev): bump eslint-plugin-unicorn from 71.1.0 to 72.0.0 (#22723) 2026-07-15 23:11:15 +08:00
assets
errors fix(utils/ofetch): surface root causes in fetch errors (#22718) 2026-07-14 21:52:50 +08:00
middleware feat(core): add a new environment variable to configure the output format (#22738) 2026-07-16 23:01:26 +08:00
routes fix(route): harden njxzc, gxmzu and jou routes (#22435) 2026-07-20 13:08:00 +08:00
routes-deprecated feat(route): nppa (#22335) 2026-06-25 01:34:49 +08:00
shims chore(deps-dev): bump eslint-plugin-unicorn from 65.0.1 to 66.0.0 (#22274) 2026-06-16 14:43:42 +08:00
utils chore(deps-dev): bump eslint-plugin-unicorn from 71.1.0 to 72.0.0 (#22723) 2026-07-15 23:11:15 +08:00
views feat(index): adaptive theme & icons 2026-07-17 03:58:25 +08:00
app-bootstrap.test.tsx
app-bootstrap.tsx
app.test.ts test: refactor tests (#22677) 2026-07-10 23:26:43 +08:00
app.ts
app.worker.tsx
config.test.ts test: refactor tests (#22677) 2026-07-10 23:26:43 +08:00
config.ts feat(core): add a new environment variable to configure the output format (#22738) 2026-07-16 23:01:26 +08:00
container.ts
index.test.ts
index.ts
pkg.test.ts
pkg.ts chore(deps-dev): bump eslint-plugin-unicorn from 65.0.1 to 66.0.0 (#22274) 2026-06-16 14:43:42 +08:00
registry-dev.test.ts perf: dx (#22478) 2026-07-09 02:37:41 +08:00
registry-dev.ts perf: dx (#22478) 2026-07-09 02:37:41 +08:00
registry-helpers.ts perf: dx (#22478) 2026-07-09 02:37:41 +08:00
registry.test.ts test: refactor tests (#22677) 2026-07-10 23:26:43 +08:00
registry.ts perf: dx (#22478) 2026-07-09 02:37:41 +08:00
route-paths.d.ts
router.js feat(route): nppa (#22335) 2026-06-25 01:34:49 +08:00
server.test.ts test: refactor tests (#22677) 2026-07-10 23:26:43 +08:00
server.ts
setup.test.ts chore(deps-dev): bump eslint-plugin-unicorn from 65.0.1 to 66.0.0 (#22274) 2026-06-16 14:43:42 +08:00
types.ts
worker.test.ts test: refactor tests (#22677) 2026-07-10 23:26:43 +08:00
worker.ts chore(deps-dev): bump eslint-plugin-unicorn from 65.0.1 to 66.0.0 (#22274) 2026-06-16 14:43:42 +08:00