fix(sites): HHClub parsing, resource list layout and request restraint (re-landed)
Re-lands901b01d, which was reverted wholesale by28974d1(BR-2 committed from the shared index). The agent UI files901b01dhad rolled back are left at their AGUI-2 versions; contracts, routes, db types and the runbook part already reached main through later commits, so this carries the rest. HHClub (憨憨) was checked read-only against a real account (one detail request; list, user data and health came from the product's own fetch). Parsing fixes: - list titles carried the site's new-torrent marker "[新]" (58 of 100 rows; the detail page title has none); stripped with a replace filter - refreshing a detail overwrote seeders / leechers / snatched / category name / H&R with null because the HHClub div detail page lacks them; detail values now fall back to the list snapshot (mergeDetailOverList), and an unknown detail promotion keeps the list promotion - level "贵宾" is VIP (umt.vipLevels) - sanitized minimal fixture HHANCLUB_LIST_PAGE_2026 + tests; README marks HHClub as verified 2026-09-29 Size, counts, category ids/names, +08:00 time and subtitle were correct. Request restraint: - site definitions may carry umt.defaults; merged with settings.sites (longer intervals, fewer pages): new settings defaultSnapshotMaxPages 1, defaultHealthCheckIntervalSec 6 h, defaultDetailCacheSec 24 h; default burst 2. HHClub: snapshot 60 min page 1 only, health 6 h, search concurrency 1, detail cache 24 h, 1 token / 3 s burst 2 - periodic / manual snapshots are capped to that page count; scheduled health checks skip sites checked within the interval; detail refresh is served from cache inside the window; live searches on one site queue - every rate-limiter token is counted per site per hour (site_request_count, migration 0046); GET /sites/{id}/request-stats; site overview and resource list show requests in the last 24 hours Resource list: two-layer rows. Main line: title + spec tags (episodes, resolution, source, codec, HDR, group, 国语/中字, site tags) + promotion with time left + H&R. Second line: subtitle (one line, ellipsis) and fixed-width category / size / seed-leech-snatched / upload time (relative, absolute on hover) columns, stale badge, inventory overlay; folds into a card on phones. Also aligns identity_candidate.normalized_title order in db types with the migrations (schema drift test). Takes effect after the stack is rebuilt (migration 0046). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
99e335d13c
commit
6e9e8efec2
22 files changed
+753
-76
No files matched your search
@@ -45,3 +45,38 @@ export const HHANCLUB_DETAIL_PAGE = `<!DOCTYPE html><html><head><title>HHCLUB ::
|
||||
<div><a href="download.php?id=90002">下载种子</a></div>
|
||||
<div id="kdescr"><a href="https://www.imdb.com/title/tt15239678/">IMDb</a> <a href="https://movie.douban.com/subject/35575567/">豆瓣</a> 简介……</div>
|
||||
</div></body></html>`;
|
||||
|
||||
/**
|
||||
* 2026-09-29 真实账号核对后补的最小脱敏片段(名称、ID、数值均已替换;不含 passkey 与用户信息)。
|
||||
* 核对到的真实行为:列表标题链接文本末尾带新种标记「[新]」(详情页标题没有);短剧分类 412;
|
||||
* 新种完成数为 0;无促销时没有 promotion-tag 元素;上传时间在 span[title] 里,文本是相对时间。
|
||||
* 下载链接带 passkey(这里用占位值)。
|
||||
*/
|
||||
export const HHANCLUB_LIST_PAGE_2026 = `<!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="torrent-table">
|
||||
<div class="torrent-table-sub-info">
|
||||
<div class="torrent-cat"><a href="?cat[]=412"><img src="pic/cattrans.gif" alt="短剧"/></a></div>
|
||||
<div class="torrent-title"><a class="torrent-info-text-name" href="details.php?id=91001&hit=1">示例短剧 1080p WEB-DL H265 AAC-HHWEB[新]</a></div>
|
||||
<div class="torrent-info-text-small_name">示例短剧 | 全30集 | 1080p</div>
|
||||
<div class="torrent-manage"><a href="download.php?id=91001&passkey=0000000000000000">下载</a></div>
|
||||
<div class="torrent-info-text-added"><span title="2026-09-29 14:07:03">5分钟</span></div>
|
||||
<div class="torrent-info-text-size">185.38 MB</div>
|
||||
<div class="torrent-info-text-seeders">1</div>
|
||||
<div class="torrent-info-text-leechers">58</div>
|
||||
<div class="torrent-info-text-finished">0</div>
|
||||
</div>
|
||||
<div class="torrent-table-sub-info">
|
||||
<div class="torrent-cat"><a href="?cat[]=402"><img src="pic/cattrans.gif" alt="电视剧"/></a></div>
|
||||
<div class="torrent-title"><a class="torrent-info-text-name" href="details.php?id=91002&hit=1">Example Show S01 2026 2160p WEB-DL H.264 AAC-HHWEB</a></div>
|
||||
<div class="torrent-info-text-small_name">示例剧集 | 第12集 | 4K | 类型: 奇幻 [内嵌中字]</div>
|
||||
<div class="torrent-manage"><a href="download.php?id=91002&passkey=0000000000000000">下载</a></div>
|
||||
<div class="torrent-info-text-added"><span title="2026-09-29 12:03:28">2时8分钟</span></div>
|
||||
<div class="torrent-info-text-size">1.46 GB</div>
|
||||
<div class="torrent-info-text-seeders">131</div>
|
||||
<div class="torrent-info-text-leechers">5</div>
|
||||
<div class="torrent-info-text-finished">187</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagination"><a href="?page=0">1-100</a><a href="?page=1">101-200</a></div>
|
||||
</body></html>`;
|
||||
Reference in new issue
Block a user