Add Facebook (reels) support to video-link import#92
Merged
Conversation
Implements fetchFacebook in the ScrapeCreators client, the third platform
after TikTok and Instagram:
- GET /v1/facebook/post → post_id (VideoID), description (caption), and
video.{sd_url, hd_url, length_in_second}. Prefers the smaller SD stream
(downloads faster, stays under the sampler's size cap; frames are scaled
down regardless), falling back to HD. Duration seconds → rounded ms.
- Best-effort transcript via /v1/facebook/post/transcript (often null, like
Instagram; falls back to caption + sampled frames).
- Verified live: a buzzfeedtasty reel's fbcdn sd_url downloads server-side
(HTTP 206, video/mp4), so it fits the existing frames pipeline cleanly.
Tests: Facebook fetch (sd preferred, seconds→ms, transcript), HD fallback,
and the not-a-video rejection. All offline.
Note: YouTube and Pinterest do NOT fit the frames pipeline — ScrapeCreators'
YouTube endpoint returns no downloadable media, and Pinterest is
image-dominant. Both need a separate transcript/description text-extraction
path, coming in a follow-up.
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
Third platform after TikTok (#89) and Instagram (#90): Facebook reels.
fetchFacebook—GET /v1/facebook/post→post_id(VideoID),description(caption),video.{sd_url, hd_url, length_in_second}. Prefers the SD stream (smaller → faster download, stays under the sampler's 120 MB cap; frames are downscaled to 640px regardless), falling back to HD. Seconds → rounded ms./v1/facebook/post/transcript(often null, like Instagram → falls back to caption + sampled frames).Verified live
A
buzzfeedtastyreel'sfbcdnsd_urldownloads server-side (HTTP 206, video/mp4) — so Facebook fits the existing frames pipeline with no special handling.Tests (offline)
TestFetchVideo_Facebook(SD preferred, seconds→ms, transcript populated),_FallsBackToHD,_NotAVideo.Scope note — YouTube & Pinterest are NOT in this PR
They don't fit the video-frames pipeline:
/v1/youtube/videoreturns no downloadable media URL (only metadata + caption tracks).description, not video.Both need a separate transcript/description text-extraction path (extract from text when there's no video to sample). That's a focused follow-up so this PR stays clean and verifiable.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BU4UWZutHd1AnK3XAf7H19