feat(sites): on-demand site detail page content (INT-2)
- SiteReleaseDetail.page: description, MediaInfo/BDInfo, screenshots,
IMDb / Douban / TMDB ids, file list, tags, uploader, plus a parse probe
(labels found) for layout-change diagnosis. Generic NexusPHP rules
(field label -> next sibling) starting from the MovieClaw detail
selectors; site overrides under umt.detail.page (HHClub: div labels).
M-Team builds the same structure from descr BBCode + mediainfo.
- Fetched only on demand (drawer open without cache, "复核详情",
release.inspect); content in kv_cache region site.detail for the
site detail cache period (>= 24 h); within the window the site is not
requested again. External ids persist in source_release.raw._detail,
which list snapshots do not overwrite.
- Screenshots only as proxy paths /api/v1/img/site-detail/{rid}/{i}:
public-address check on every hop, no site credentials, magic-byte
image check, 8 MB cap. Poster proxy shares the same helper.
- Identity: site ids count as explicit-id evidence; when TMDB is
queried, a TMDB id goes straight to details and an IMDb id to
/find (no title search on a hit). Douban only for local recall.
- Release drawer "站点详情页" section; fixtures and tests for HHClub div
layout, rowhead layout, BBCode, cache/proxy/identity end to end.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
6e9e8efec2
commit
04cffcd1f1
30 files changed
+1133
-64
No files matched your search
@@ -80,3 +80,31 @@ export const HHANCLUB_LIST_PAGE_2026 = `<!DOCTYPE html><html><head><title>HHCLUB
|
||||
</div>
|
||||
<div class="pagination"><a href="?page=0">1-100</a><a href="?page=1">101-200</a></div>
|
||||
</body></html>`;
|
||||
|
||||
/**
|
||||
* 详情页扩展内容(简介 / MediaInfo / 截图 / 外部链接 / 标签 / 上传者 / 文件清单)fixture:
|
||||
* 结构按 HHClub div 模板(「标签」div + 相邻值 div)与 NexusPHP #kdescr 简介编写,数值均为示例。
|
||||
*/
|
||||
export const HHANCLUB_DETAIL_PAGE_FULL = `<!DOCTYPE html><html><head><title>HHCLUB :: 种子详情</title></head><body>
|
||||
<div id="user-info-panel"><a href="userdetails.php?id=7" class="VIP_Name">bob</a> <a href="logout.php">退出</a></div>
|
||||
<div class="grid">
|
||||
<div class="font-bold leading-6">标题</div><div class="font-bold leading-6">Example.Show.S01.2026.2160p.WEB-DL.H265.AAC-HHWEB</div>
|
||||
<div class="font-bold leading-6">副标题</div><div class="font-bold leading-6">示例剧集 | 全12集 | 4K</div>
|
||||
<div><span class="font-bold">大小:</span><span>12.50 GB</span></div>
|
||||
<div class="font-bold leading-6">标签</div><div class="font-bold leading-6"><span class="tag">官方</span><span class="tag">中字</span><span class="tag">完结</span></div>
|
||||
<div class="font-bold leading-6">上传者</div><div class="font-bold leading-6"><a href="userdetails.php?id=321">uploader01</a></div>
|
||||
<div><a href="download.php?id=91002">下载种子</a></div>
|
||||
<div class="font-bold leading-6">简介</div>
|
||||
<div id="kdescr">
|
||||
<img src="attachments/202609/poster.jpg" alt="poster"><br>
|
||||
◎译 名 示例剧集<br>◎年 代 2026<br>
|
||||
◎IMDb链接 <a href="https://www.imdb.com/title/tt14452776/">https://www.imdb.com/title/tt14452776/</a><br>
|
||||
◎豆瓣链接 <a href="https://movie.douban.com/subject/36000001/">https://movie.douban.com/subject/36000001/</a><br>
|
||||
◎TMDB <a href="https://www.themoviedb.org/tv/136315">themoviedb</a><br>
|
||||
<img src="pic/smilies/1.gif">
|
||||
<fieldset><legend>MediaInfo</legend><div class="codemain">General<br>Unique ID : 1234<br>Complete name : Example.Show.S01E01.mkv<br>Format : Matroska<br>File size : 1.04 GiB<br>Duration : 45 min<br><br>Video<br>ID : 1<br>Format : HEVC<br>Width : 3 840 pixels</div></fieldset>
|
||||
<img src="https://img.example-host.com/i/shot1.png"><img data-src="https://img.example-host.com/i/shot2.jpg" src="pic/trans.gif">
|
||||
</div>
|
||||
<div class="font-bold leading-6">文件列表</div>
|
||||
<div class="font-bold leading-6"><ul><li>Example.Show.S01E01.mkv (1.04 GB)</li><li>Example.Show.S01E02.mkv (1.02 GB)</li></ul></div>
|
||||
</div></body></html>`;
|
||||
@@ -144,7 +144,7 @@ function detailBody(r: MockNexusRelease): string {
|
||||
<tr><td class="rowhead">副标题</td><td class="rowfollow" align="left">${esc(r.subtitle ?? "")}</td></tr>
|
||||
<tr><td class="rowhead">基本信息</td><td class="rowfollow" align="left"><b>大小:</b>${esc(r.sizeText)} <b>类型:</b> ${esc(r.catName)} 发布于 <span title="${r.uploadedAt}">${esc(r.relativeTime ?? r.uploadedAt)}</span></td></tr>
|
||||
<tr><td class="rowhead">同伴</td><td class="rowfollow" align="left">${r.seeders.replace(/,/g, "")}个做种者 | ${r.leechers.replace(/,/g, "")}个下载者</td></tr>
|
||||
<tr><td class="rowhead">简介</td><td class="rowfollow" align="left"><div id="kdescr">${esc(r.description ?? "暂无简介")}</div></td></tr>
|
||||
<tr><td class="rowhead">简介</td><td class="rowfollow" align="left"><div id="kdescr">${r.descriptionHtml ?? esc(r.description ?? "暂无简介")}</div></td></tr>
|
||||
</table>`;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ export interface MockNexusRelease {
|
||||
hr?: boolean;
|
||||
uploader?: string;
|
||||
description?: string;
|
||||
/** 简介原样 HTML(优先于 description;用于详情页扩展内容测试) */
|
||||
descriptionHtml?: string;
|
||||
/** 下载返回磁力而不是 .torrent */
|
||||
magnet?: string;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user