feat(identity): source-aware short-drama enrichment with snippet mode and hit rate (META-2)

- classify enrich sources: encyclopedia, platform pages (hongguo, kuaikaw, video
  platforms), douban (search snippet only) and other sites' search snippets
  (snippet mode, pages never opened); one extractor per source, fields carry
  source kind and confidence, merged by noisy-OR across hosts
- new cast field (applied as MediaCredit with placeholder ids)
- robots.txt check (cached per host 1 day) and login-wall/captcha give-up
- per-enrichment source attempts + GET /identity/enrich-stats, 30-day hit-rate
  table under settings -> metadata -> identity
- setting identity.enrichSnippetAllSites (default on); default domains add
  baike.com and kuaikaw.cn
- replay fixtures from the real run on the 4 user-library short dramas
  (sanitized Brave responses, hongguo page, robots.txt)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-30 18:40:19 +08:00
1 parent 081db4651c
commit 9489e40e0c
23 files changed
+2615 -323

No files matched your search

+12
View File
@@ -4,6 +4,18 @@
## [Unreleased]
### 新增(META-2 短剧元数据补全扩大来源)
- 元数据补全按来源分类抽取:百科(百度 / 搜狗 / 快懂百科、维基)、平台作品页(红果短剧、河马剧场、各视频平台)、豆瓣(只用搜索摘要,不读页面)、其它网站的搜索摘要(摘要模式:只看搜索引擎给的摘要,不打开聚合站网页)。每类来源一个抽取器(标题 / 别名、年份、集数、主演、简介、类型、平台、海报),每个字段带来源类别与置信度,多个网站给出同一值时叠加置信度,取最高的。
- 新增「主演」字段,应用时写进作品主演(没有 TMDB 人物 ID,不链接 TMDB)。
- 读网页前查 robots.txt(每个网站缓存 1 天),不允许的不读;遇到登录墙 / 验证码放弃该来源。
- 命中率:每次补全记录各类来源的结果数与是否命中;设置 → 元数据 → 资源识别 下方显示最近 30 天各来源的命中率,接口 `GET /identity/enrich-stats`。
- 设置「也用其它网站的搜索摘要」(`identity.enrichSnippetAllSites`,缺省开);补全白名单缺省加 `baike.com`、`kuaikaw.cn`(已保存过白名单的需手动加)。
- 真机验证:用户库 4 条短剧此前全部无结果,现在 4 条都从搜索摘要补到标题与年份,3 条有集数,4 条有主演(见 `docs/runbook/identity.md`「真机记录(META-2)」)。
### 变更(META-2)
- 补全的第二次搜索改为「标题 短剧 site:百科 / 豆瓣 / 平台」,摘要已够用时不再搜;只读结果标题 / 摘要含完整标题的网页(只有七成字对得上的首页、榜单页不再读)。
- 模型抽取改为候选之一:模型改写的值置信度 0.3,网页原文更可信时取原文(以前模型改写的简介会盖过原文)。
## [0.3.2] - 2026-09-30
### 新增(BR-4 浏览器 UA 与指纹统一)