Video import PR2a: ScrapeCreators client (platform detect + TikTok)#87
Merged
Conversation
PR2a of the video-link import pipeline. New internal/video package: - DetectPlatform classifies TikTok/Instagram/YouTube/Facebook/Pinterest URLs. - ScrapeCreatorsClient.FetchVideo resolves a URL to normalized VideoMeta (video ID, caption, transcript, no-watermark media URL, duration) via the ScrapeCreators API (x-api-key). TikTok implemented + verified against the live response; other platforms stubbed for follow-up. - httpDo request seam keeps it fully unit-tested offline. Next: PR2b ffmpeg frame sampling + Dockerfile; PR2c orchestration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BU4UWZutHd1AnK3XAf7H19
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR 2a of the premium video-link import pipeline (foundation merged in #86). New
internal/videopackage that acquires a video's caption, transcript, and downloadable media URL via the ScrapeCreators API.DetectPlatform— classifies TikTok / Instagram / YouTube / Facebook / Pinterest URLs by host.ScrapeCreatorsClient.FetchVideo→ normalizedVideoMeta{VideoID, Caption, Transcript, MediaURL, DurationMS}. Auth viax-api-key. TikTok implemented and verified against the live API (/v2/tiktok/videowithget_transcript=true→aweme_detail.desc,.video.download_no_watermark_addrwithplay_addrfallback, bundledtranscript). The other four platforms are stubbed (not yet supported) for fast-follow — same client shape.httpDorequest seam keeps it fully unit-tested offline (no network, no key).Tests
DetectPlatform(all 5 platforms + unsupported/garbage), TikTok parse (no-watermark + play_addr fallback), unsupported-platform + HTTP-error paths.go test ./... -count=1-> green (12 packages, 0 failures).Next
POST /v1/recipes/import/video+ poll endpoint, fanningVideoMeta(frames + transcript) intoExtractRecipesFromMedia, with the premium gate, cache, metering, and daily-budget kill switch.🤖 Generated with Claude Code
https://claude.ai/code/session_01BU4UWZutHd1AnK3XAf7H19