Improve embed handling and Gemini verdict flow
build-push / docker (push) Successful in 4m15s

This commit is contained in:
AI Assistant
2026-03-16 14:09:33 +09:00
parent a37e02aea9
commit 7d9a939633
5 changed files with 64 additions and 51 deletions
+15
View File
@@ -341,6 +341,21 @@
- [ ] full browser-level validation was not fully reproducible in this environment
## Recent Change Log
- Date: `2026-03-16`
- What changed:
- Google Video embed URL now uses `youtube-nocookie` with explicit `origin` to reduce player load failures.
- Gemini Vision prompt now forces a `Yes` or `No` verdict per candidate and only `Yes` candidates are merged into the final result set.
- Candidate visual fetch now prefers Envato / Artgrid preview video frames before thumbnails and sends a `Referer` header for thumbnail fetches.
- Envato / Artgrid enrichment now retries preview extraction once after a short delay when the first fetch still lacks a usable preview URL.
- Why it changed:
- The user reported YouTube player error `153`, too many fallback-style results, and source pages that appear to need additional loading time before preview URLs become visible.
- How it was verified:
- log review from `ai-media-hub-2026-03-16T05-05-58-704Z.log`
- `go test ./...`
- What is still risky or incomplete:
- If a YouTube video has embedding disabled by the uploader, no embed URL variant will fully bypass that restriction.
- Delay-and-retry HTML fetching cannot execute JavaScript, so pages that only expose preview URLs after full client-side rendering may still need a real browser-based fetch path later.
- Date: `2026-03-16`
- What changed:
- Reduced the heaviest search-stage caps slightly: fewer query variants per request, smaller per-source result caps, lower enrichment scope, and a bounded Gemini candidate set.