- rss: port of MP RssHelper._parse_impl/get_rss_link semantics with safe XML (entities off, DTD/ENTITY rejected, size/item caps), ETag/Last-Modified, backoff + Retry-After, circuit breaker with manual reset, passkey redaction, overlap-window GUID+digest dedupe - sites/spider: TS port of MP SiteSpider (indexer schema, search URL builder, field DSL, filters, Jinja templates via nunjucks, login-page detection); audiences definition hand-written as JSON; raw category id preserved; shared per-site token bucket - sites/mteam: port of MP MTorrentSpider (params, result mapping, promo factors, genDlToken flow) without embedding the API key in enclosures; business code/message checks - testkit: mock RSS server, mock NexusPHP site, mock M-Team API - docs: W1-3b migration mapping appended to porting ledger Co-Authored-By: Claude Fable 5.1 <[email protected]>
103 lines
2.8 KiB
TypeScript
103 lines
2.8 KiB
TypeScript
/**
|
|
* mock NexusPHP(观众风格)资源 fixture。HTML 结构按 NexusPHP 公开页面惯例自行编写,
|
|
* 类名(torrent-subtitle-line / pro_* / hitandrun)用于验证选择器配置,不代表已核对真实站点。
|
|
*/
|
|
|
|
export type MockNexusPromo = "free" | "free2up" | "50pctdown" | "50pctdown2up" | "30pctdown" | "2up";
|
|
|
|
export interface MockNexusRelease {
|
|
id: string;
|
|
title: string;
|
|
/** 不给 title 属性,只显示截断文字 */
|
|
truncatedText?: string;
|
|
subtitle?: string;
|
|
catId: string;
|
|
catName: string;
|
|
sizeText: string;
|
|
seeders: string;
|
|
leechers: string;
|
|
snatched: string;
|
|
/** 站点本地时间 YYYY-MM-DD HH:mm:ss */
|
|
uploadedAt: string;
|
|
relativeTime?: string;
|
|
promo?: MockNexusPromo;
|
|
promoUntil?: string;
|
|
hr?: boolean;
|
|
uploader?: string;
|
|
description?: string;
|
|
/** 下载返回磁力而不是 .torrent */
|
|
magnet?: string;
|
|
}
|
|
|
|
export const AUDIENCES_FIXTURE_RELEASES: MockNexusRelease[] = [
|
|
{
|
|
id: "812345",
|
|
title: "Dune.Part.Two.2024.2160p.UHD.BluRay.REMUX.DV.HDR.HEVC.TrueHD.Atmos.7.1-FraMeSToR",
|
|
subtitle: "沙丘2 / 沙丘:第二部 | 杜比视界 国英双语 中字",
|
|
catId: "401",
|
|
catName: "电影",
|
|
sizeText: "78.42 GB",
|
|
seeders: "1,204",
|
|
leechers: "17",
|
|
snatched: "3,388",
|
|
uploadedAt: "2026-09-26 21:14:03",
|
|
relativeTime: "3小时前",
|
|
promo: "free",
|
|
promoUntil: "2026-10-01 12:00:00",
|
|
uploader: "uploader1",
|
|
description: "https://www.imdb.com/title/tt15239678/ https://movie.douban.com/subject/35575567/",
|
|
},
|
|
{
|
|
id: "812346",
|
|
title: "Keep.Running.S12E01.20240426.2160p.WEB-DL.H265.AAC-LelveTV",
|
|
subtitle: "奔跑吧 第十二季 第1期",
|
|
catId: "403",
|
|
catName: "综艺",
|
|
sizeText: "5.12 GB",
|
|
seeders: "88",
|
|
leechers: "2",
|
|
snatched: "410",
|
|
uploadedAt: "2026-09-26 20:00:00",
|
|
hr: true,
|
|
},
|
|
{
|
|
id: "812347",
|
|
title: "The.Bear.S03.2160p.DSNP.WEB-DL.DDP5.1.Atmos.DV.H.265-FLUX",
|
|
subtitle: "熊家餐馆 第三季",
|
|
catId: "402",
|
|
catName: "剧集",
|
|
sizeText: "1,234.56 MiB",
|
|
seeders: "35",
|
|
leechers: "0",
|
|
snatched: "120",
|
|
uploadedAt: "2026-09-25 08:30:00",
|
|
promo: "50pctdown2up",
|
|
promoUntil: "2026-09-29 08:30:00",
|
|
},
|
|
{
|
|
id: "812348",
|
|
title: "The.Last.of.Us.S02.2160p.MAX.WEB-DL.DDP5.1.Atmos.DV.HDR.H.265-FLUX",
|
|
truncatedText: "The.Last.of.Us.S02.2160p.MAX.WEB-DL.DDP5.1.Atmos.D…",
|
|
catId: "402",
|
|
catName: "剧集",
|
|
sizeText: "2.1 TB",
|
|
seeders: "12",
|
|
leechers: "1",
|
|
snatched: "44",
|
|
uploadedAt: "2026-09-24 10:00:00",
|
|
},
|
|
{
|
|
id: "812349",
|
|
title: "Planet.Earth.III.2023.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.5.1-GRP",
|
|
subtitle: "地球脉动 第三季",
|
|
catId: "406",
|
|
catName: "纪录片",
|
|
sizeText: "850 KB",
|
|
seeders: "5",
|
|
leechers: "0",
|
|
snatched: "9",
|
|
uploadedAt: "2026-09-23 10:00:00",
|
|
promo: "2up",
|
|
},
|
|
];
|