feat(adapters): RSS and PT site adapters ported from MoviePilot v3 + mocks (W1-3b)
- 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]>
This commit is contained in:
1 parent
ef2e504a94
commit
a6d049db81
47 files changed
+5414
No files matched your search
@@ -0,0 +1,102 @@
|
||||
/**
|
||||
* mock M-Team API fixture。字段名按公开 API 与迁移账本 §7.2 整理,待真实账号核验。
|
||||
* 数值字段在真实 API 中多为字符串,这里保持同样形态。
|
||||
*/
|
||||
|
||||
export interface MockMteamTorrent {
|
||||
id: string;
|
||||
name: string;
|
||||
smallDescr?: string;
|
||||
category: string;
|
||||
size: string;
|
||||
createdDate: string;
|
||||
imdb?: string;
|
||||
douban?: string;
|
||||
labels?: string;
|
||||
labelsNew?: string[];
|
||||
descr?: string;
|
||||
status: {
|
||||
seeders: string;
|
||||
leechers: string;
|
||||
timesCompleted: string;
|
||||
discount: string;
|
||||
discountEndTime?: string | null;
|
||||
promotionRule?: { discount: string; endTime: string } | null;
|
||||
mallSingleFree?: { status: string; endDate: string } | null;
|
||||
};
|
||||
}
|
||||
|
||||
export const MTEAM_FIXTURE_TORRENTS: MockMteamTorrent[] = [
|
||||
{
|
||||
id: "912233",
|
||||
name: "Shogun.2024.S01.2160p.DSNP.WEB-DL.DDP5.1.Atmos.DV.HDR.H.265-FLUX",
|
||||
smallDescr: "幕府将军 第一季 全10集 杜比视界",
|
||||
category: "402",
|
||||
size: "61234567890",
|
||||
createdDate: "2026-09-20 08:15:00",
|
||||
imdb: "https://www.imdb.com/title/tt2788316/",
|
||||
labelsNew: ["中字", "DV"],
|
||||
descr: "[img]poster[/img] 幕府将军",
|
||||
status: {
|
||||
seeders: "532",
|
||||
leechers: "4",
|
||||
timesCompleted: "2011",
|
||||
discount: "PERCENT_50",
|
||||
discountEndTime: "2026-09-28 08:15:00",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "912234",
|
||||
name: "Oppenheimer.2023.2160p.UHD.BluRay.REMUX.DV.HDR.HEVC.DTS-HD.MA.5.1-FGT",
|
||||
smallDescr: "奥本海默",
|
||||
category: "439",
|
||||
size: "91234567890",
|
||||
createdDate: "2026-09-21 10:00:00",
|
||||
imdb: "https://www.imdb.com/title/tt15398776/",
|
||||
labels: "6",
|
||||
status: {
|
||||
seeders: "120",
|
||||
leechers: "3",
|
||||
timesCompleted: "800",
|
||||
discount: "PERCENT_50",
|
||||
mallSingleFree: { status: "ONGOING", endDate: "2026-09-27 20:00:00" },
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "912235",
|
||||
name: "Frieren.S01.2023.1080p.BluRay.x265.10bit.FLAC-VCB",
|
||||
smallDescr: "葬送的芙莉莲 第一季",
|
||||
category: "405",
|
||||
size: "45000000000",
|
||||
createdDate: "2026-09-22 12:00:00",
|
||||
status: {
|
||||
seeders: "300",
|
||||
leechers: "10",
|
||||
timesCompleted: "1500",
|
||||
discount: "NORMAL",
|
||||
promotionRule: { discount: "FREE", endTime: "2026-10-07 23:59:59" },
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "912236",
|
||||
name: "Planet.Earth.III.2023.2160p.iP.WEB-DL.DDP5.1.HDR.H.265-GRP",
|
||||
category: "404",
|
||||
size: "30000000000",
|
||||
createdDate: "2026-09-23 09:00:00",
|
||||
status: {
|
||||
seeders: "50",
|
||||
leechers: "1",
|
||||
timesCompleted: "90",
|
||||
discount: "_2X_FREE",
|
||||
discountEndTime: "2026-09-30 00:00:00",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "912237",
|
||||
name: "Paris.2024.Olympics.Opening.Ceremony.2160p.WEB-DL.H265-GRP",
|
||||
category: "407",
|
||||
size: "12000000000",
|
||||
createdDate: "2026-09-24 09:00:00",
|
||||
status: { seeders: "10", leechers: "0", timesCompleted: "22", discount: "NORMAL" },
|
||||
},
|
||||
];
|
||||
Reference in new issue
Block a user