132ca6bb70
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (push) Successful in 2s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 36s
CI/CD Pipeline / Build Staging API Image (push) Successful in 41s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Successful in 18s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 49s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 2m45s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m35s
CI/CD Pipeline / Integration Tests (push) Successful in 3m56s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 4m24s
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
根因:
- yt-dlp DouyinIE 当前需要 fresh cookies(即使只提取元信息),
staging 上的 douyin_cookies.txt 是占位文件(3行),导致直链拿不到
- 原代码路径A(MediaKit ASR)因 direct_url=None 完全跳过
- 路径B(下载+本地ASR)同样因 cookies 失败返回友好 503
修复:
1. 修复 MediaKitClient monkey-patch 属性名错误
(原用 self.base_url/self.api_key/self.timeout,实际是 self._base_url 等私有属性;
错误添加了 _mk_headers 与类自带 _headers() 重复)
2. yt-dlp 增加 extractor_args 和 Accept-Language header
3. 新增第三方无水印解析 API 兜底(apizero.cn),
yt-dlp 失败时自动切换,拿到直链后仍走 MediaKit ASR
4. 路径B 支持直接用第三方直链下载 MP4(不依赖 yt-dlp/cookies)
5. MediaKit ASR 轮询增加瞬时网络错误重试
6. 全部路径失败时返回友好 503(不再返回空 text 导致前端异常)
验证:本地通过 apizero 成功解析 https://v.douyin.com/hb-giW8cC1Q/
返回直链可下载(23MB mp4),HTTP 200