feat(etl): 新增 yinyan_song_records 平台回填与歌手优先录音选取
- 在 ETL 入口增加 --backfill-yinyan-platforms 参数,支持回填缺失平台代码 - 实现回填函数 backfill_yinyan_record_platforms,批量更新 platform 为空的记录 - fetch_all_platform_records 支持获取所有录音供歌手数据缺失的回退使用 - 通过 _pick_record_with_singer 函数优先选取有歌手数据的录音 - 初始化函数跳过已存在 song_id 的批次,避免重复处理 - yinyan_song_records 插入时允许更新 platform 字段,平台数据更完整 - upsert_yinyan_song_records 增加 record_id 更新支持,修正推送逻辑 - 所有平台歌曲标题拆分版本号存储 version 字段,支持特殊版本标记 - 在各平台封面缺失时使用歌曲封面回退,保证封面不为空 - spider 模块新增 probe_*_has_singers 函数校验录音是否有关联歌手 - writer 模块完善更新平台代码的操作及相关查询辅助函数 - utils 新增 split_title_version 助手,提取括号中版本信息 - upload_plain_lyric_to_bucket 上传时添加内容类型头,避免文本编码问题 - 测试覆盖添加回填功能及版本号拆分相关逻辑,提高稳定性维护性
Showing
10 changed files
with
248 additions
and
33 deletions
This diff is collapsed.
Click to expand it.
tests/test_utils.py
0 → 100644
-
Please register or sign in to post a comment