Files
UHD_Media_Tool/packages/adapters/src/sites/index.ts
T
rootandClaude Opus 5.5 b1d30bd6ee fix(sites): 观众健康检查误报未登录,健康失败原因细分(HC-1)
观众 2026 版首页没有 <a href=logout>:退出按钮在 userbar 的 data-uploader-actions JSON
里由脚本渲染,旧登录标志 a[href*="logout"] 永远不命中,健康检查报"未登录"而用户数据正常。

- audiences 定义 loginSuccess 改为 #info_block / usercp.php / logout 任一(0.2.1)
- 健康检查判定细分:登录页 / 权限页 / 疑似人机验证 / 找不到登录标志(带选择器),
  原始判定写入 last_health.detail,站点概览技术信息展示
- 首页只是找不到登录标志时,以 24 小时内用户数据解析成功为已登录证据(同 MP)
- 新 SiteError 类 challenge(cf-mitigated: challenge),不算凭据错误;健康状态 challenge
- testkit mock 增加 setHeaderLayout;加观众首页脱敏结构样本的差分测试

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 20:38:48 +08:00

135 lines
3.4 KiB
TypeScript

export {
audiencesDefinition,
BUILTIN_SITE_DEFINITIONS,
chdbitsDefinition,
DefinitionProvenanceSchema,
hhanclubDefinition,
IndexerDefinitionSchema,
loadIndexerDefinition,
loadSiteDefinition,
MteamDefinitionSchema,
parseIndexerDefinition,
parseMteamDefinition,
parseSpecializedSiteDefinition,
SpecializedSiteDefinitionSchema,
SpiderFieldSelectorSchema,
SpiderFilterSchema,
} from "./definitions/index.ts";
export type { SiteAdapterDeps } from "./deps.ts";
export {
cleanDescription,
DEFAULT_DESCRIPTION_RULES,
type DescriptionRules,
type DetailInfoItem,
type StructuredDescription,
stripMarkup,
structureDescription,
} from "./detail-description.ts";
export { type FormattedDetailPage, formatDetailPage } from "./detail-format.ts";
export {
type FeedMediaType,
normalizeSiteFeedItem,
type SiteFeedItemFields,
siteCategoryMediaType,
} from "./feed-item.ts";
export { buildFileTree, type FileRole, type FileTreeRow } from "./file-tree.ts";
export {
classifyLoginError,
loginFailureText,
loginNexusPhp,
type NexusLoginForm,
type NexusLoginInput,
type NexusLoginResult,
SiteLoginError,
type SiteLoginFailure,
totpCode,
} from "./login/nexusphp.ts";
export {
type MediaAudioTrack,
type MediaGeneral,
type MediaSummary,
type MediaTextTrack,
type MediaVideoTrack,
parseMediaSummary,
} from "./mediainfo.ts";
export { createMteamAdapter, mteamTorrentToRelease } from "./mteam/adapter.ts";
export { type MteamApiPath, mteamPost } from "./mteam/client.ts";
export { type MteamDefinition, mteamApiBase, mteamDefinition } from "./mteam/definition.ts";
export {
findImdbid,
getDownloadVolumeFactor,
getUploadVolumeFactor,
type MteamTorrentJson,
mteamSearchParams,
parseMteamResult,
} from "./mteam/spider.ts";
export {
createSharedSiteRateLimiter,
createSiteRateLimiter,
type RateLimiterOptions,
type SharedBucketPort,
type SharedRateLimiterOptions,
type SiteRateLimiter,
} from "./rate-limit.ts";
export {
createSiteAdapter,
getSiteAdapter,
getSiteDefinition,
listSiteDefinitions,
SITE_DEFINITIONS,
type SiteDefinition,
} from "./registry.ts";
export { clearSearchText, createSpiderSiteAdapter, judgeLoginPage } from "./spider/adapter.ts";
export { parseDetailPage } from "./spider/detail.ts";
export { promotionFromFactors, spiderTorrentToRelease } from "./spider/map.ts";
export { mcSelect } from "./spider/mc-selector.ts";
export type {
DefinitionProvenance,
IndexerDefinition,
SpiderCategoryConfig,
SpiderCategoryItem,
SpiderFieldSelector,
SpiderFields,
SpiderFilter,
UmtSiteExtension,
} from "./spider/schema.ts";
export {
combineUrl,
type MediaKind,
type MpMediaType,
parseSizeMp,
resolveCategoryMediaType,
SiteSpider,
type SiteSpiderQuery,
type SpiderTorrent,
selectMediaCategories,
} from "./spider/spider.ts";
export * from "./spiders/index.ts";
export {
type DownloadTarget,
type HitAndRun,
type PromotionType,
type SecretResolver,
type SiteAdapter,
type SiteCallOptions,
type SiteCapabilities,
type SiteCategory,
type SiteCredentialKind,
type SiteDetailFile,
type SiteDetailPage,
SiteError,
type SiteErrorKind,
type SiteHealth,
type SiteHealthDetail,
type SiteHealthStatus,
type SiteKind,
type SiteListFilters,
type SitePage,
type SitePromotion,
type SiteRelease,
type SiteReleaseDetail,
staticSecretResolver,
} from "./types.ts";
export * from "./user-parsers/index.ts";
export { parseCount, parseSiteTime } from "./util.ts";