feat(parser,sites): W5-D port title/zhconv/site parsing gaps found by MP differential

Title recognition (parseRelease / parseReleasePath):
- anime prefix tags (★N月新番, [国漫], 【22年日剧】), category lead bracket, `A / B` cn aliases
- `Name [01]`, `[TV 04]`, `#13`, `名称 12.mkv`, `S01 13-14`, `E13-14` episodes
- lead bracket as title vs group, trailing [Group], YTS.MX/Hall_of_C style groups, 字幕组 suffix
- `[dot.release.name][…]` unbracketing, `Season 2017` as year, leading date not airDate,
  date-only parent dir does not merge as TV
- original disc: Blu-ray + AVC/HEVC/VC-1/MPEG-2 without x26x/H.26x -> BluRay-Disc
- `{[tmdbid=;type=;s=;e=]}` explicit block, bangumi/anilist ids
- bare [1080]/[5.1], DTS-HD MA5.1, £ multi-group, 合集, pinyin title -> cn from subtitle,
  streaming platform table, CHS/CHT/GB/BIG5 in subtitle
zh-map: add 迴滾魷瑯臥駭; document one-to-many chars kept out.
Sites: tbody branch + header-row tightening via movieclaw-import rowSelector (18 definitions),
row-level case/hr/labels include the row itself, subtitle branch (searchType: "subtitles"),
parseSizeMp banker's rounding.
Differential snapshots regenerated; MP test sample sources registered in ledger.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-27 23:09:14 +08:00
1 parent 8352e5e881
commit 36dc048e89
41 files changed
+3111 -2372

No files matched your search

@@ -1,2 +1,3 @@
export * from "./chdbits.ts";
export * from "./hhanclub.ts";
export * from "./subtitles.ts";
@@ -0,0 +1,29 @@
/**
* NexusPHP 字幕页 fixture(hhanclub 风格 div 网格,自行编写,**未对照真实页面**)。
* 与 `packages/adapters/test/differential` 的 `hhanclub-subtitles@inline` 样本同构,供 SiteSpider 字幕分支测试。
*/
const row = (i: number) =>
`<div class="grid"><div><img src="pic/flag/china.gif"></div><div>
<a href="downloadsubs.php?torrentid=${i}&amp;subid=${1000 + i}">Example Show S01E0${i + 1} 1080p WEB-DL CHS</a>
<a href="https://hhanclub.net/userdetails.php?id=${i}"><b>tester${i}</b></a></div>
<div><div>111.99&nbsp;KB</div></div><div><span title="2026-04-21 20:54:37">1月18天</span></div>
<div><a href="report.php?subtitle=${1000 + i}">举报</a></div></div>`;
export const NEXUSPHP_SUBTITLES_PAGE = `<!DOCTYPE html><html><head><title>字幕</title></head><body>
<div id="subtitles-table">${[0, 1, 2].map(row).join("")}<div class="grid"><div></div><div>没有下载链接的行</div></div></div>
</body></html>`;
/** 与上面 fixture 配套的字幕配置(MP `indexer.subtitles` 结构) */
export const NEXUSPHP_SUBTITLES_CONFIG = {
list: { selector: "#subtitles-table > div" },
fields: {
language_icon: { selector: "div:nth-child(1) img", attribute: "src" },
title: { selector: 'div:nth-child(2) a[href*="downloadsubs.php"]' },
download: { selector: 'div:nth-child(2) a[href*="downloadsubs.php"]', attribute: "href" },
size: { selector: "div:nth-child(3)" },
date_added: { selector: "div:nth-child(4) span", attribute: "title" },
date_elapsed: { selector: "div:nth-child(4) span" },
uploader: { selector: 'div:nth-child(2) a[href*="userdetails.php"]' },
report: { selector: 'div:nth-child(5) a[href*="report.php"]', attribute: "href" },
},
};