feat: 跳过判定改为覆盖率(缺图能补,抓全才跳过)

此前只要某场秀已入库 >=10 张就整场跳过,当初只成功抓了十几张的场次
剩下的图永远补不上。

- payload 增加 expected_images(本场应有张数,后端据此算覆盖率)
- 跳过条件:images >= expected - 5;expected 未知时回落 10 张阈值
- 留 5 张余量:个别图在 Vogue 侧永久 404,要求一张不差会让这场秀
  永远判不完整、每次全量抓都重下一遍
This commit is contained in:
toom1996
2026-10-25 23:43:12 +08:00
parent 1ead57dd22
commit 463a57c497
4 changed files with 69 additions and 11 deletions

View File

@ -25,6 +25,9 @@ type RunwayIngest struct {
CollectionType string `json:"collection_type"` // rtw / menswear / couture / resort / pre_fall
City string `json:"city"` // 地区/城市(street 用)
PublishedAt uint32 `json:"published_at"` // Vogue 详情页 datePublished 的 Unix 时间戳(秒);0=未抽取。标题缺年份时用于矫正 year
// ExpectedImages 本场秀应有的图片总数(含细节图)。
// 后端用它做覆盖率判定:实际入库张数接近它才算抓全;否则下次重爬会来补。
ExpectedImages int `json:"expected_images,omitempty"`
Images []string `json:"images"` // 兼容旧 worker:铺平的主图 URL 列表
// Looks 结构化「主图 + 细节图」分组(Vogue 一个 gallery item = 1 主图 + N 细节图)。
// 结构化上报时优先用 Looks;为空时 worker 回退到 Images(全部视为主图)。