Provision curl_cffi so yt-dlp's Reddit workaround runs as designed - #27
Merged
Conversation
miridius
force-pushed
the
provision-yt-dlp-impersonation
branch
from
July 25, 2026 19:30
3bb0303 to
e107230
Compare
yt-dlp's merged fix for Reddit's anonymous-API removal bootstraps its session with browser impersonation, which silently degrades without curl_cffi installed (yt-dlp/yt-dlp#16877): scrapes then fail with 429s whenever Reddit's rolling enforcement tightens. Both images now install it and strip the build-only pip afterward. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DL3md3a3RoeRNStaDv1PDf
miridius
force-pushed
the
provision-yt-dlp-impersonation
branch
from
July 25, 2026 19:33
e107230 to
34474e8
Compare
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.
Problem
Reddit is removing anonymous JSON API access; when its rolling enforcement bites, scrapes fail with
HTTP Error 429(observed twice in production logs on 2026-07-24/25, where a non-video link then drew a group error reply because the scrape failed before the bot could classify the link). yt-dlp's merged workaround (yt-dlp/yt-dlp#16839) bootstraps a session using browser impersonation, and its author notes the bootstrap 403s without that capability (yt-dlp/yt-dlp#16877). Both our images lack the impersonation dependency the workaround requires, so by upstream's account the bot runs it degraded.Fix
Install
curl_cffiin both images, viapython3-pipwith--no-cache-dir, strippingpython3-pipagain after use. In the built imagescurl_cffiimports, yt-dlp reports impersonation targets available, and pip is absent at runtime.Not verified empirically against the failure itself: enforcement isn't currently biting, so a with/without comparison cannot discriminate right now. This ships on the upstream maintainers' documented requirement; if 429 windows recur with this in place, the investigation reopens.