Bypass YouTube SABR + PO-token block by default#27
Open
seanpuenteorg wants to merge 1 commit into
Open
Conversation
The default `web` and `tv` yt-dlp clients began returning HTTP 403 on most public YouTube videos in late 2025 unless a PO (Proof-of-Origin) token is supplied. This makes the skill fail end-to-end on a fresh install for the most common source — including the skill's own demo URL. Falling back to `ios,web_safari,android,tv` for player_client lets yt-dlp serve format 18 (360p mp4) without a PO token. Listing `tv` last keeps the original behaviour reachable when the upper clients succeed. Also documents the failure mode in SKILL.md so Claude can recognize the symptom and route to `--cookies-from-browser` rather than guessing. Reproducer (pre-patch, on a clean install): python3 scripts/watch.py https://www.youtube.com/watch?v=QZMljuD10sU → ERROR: unable to download video data: HTTP Error 403: Forbidden Post-patch: 21 MB mp4 + en.vtt download cleanly, 278 caption segments, 80-frame report generated.
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.
Why
On a clean install today, running the skill's own demo URL fails:
YouTube has been routing the default
web/tvyt-dlp clients through SABR-only streams that require a PO (Proof-of-Origin) token. Without one, the format URLs come back unauthorised and the whole pipeline aborts before frames or transcript are produced. The skill ships a sensible yt-dlp invocation today, but it doesn't include the now-standard workaround.What
One flag to
yt-dlp:These three clients still serve
format 18(360p mp4) without a PO token.tvis kept at the end so the original behaviour remains reachable when the upper clients succeed. Plus aSKILL.mdline under "Failure modes" so Claude can recognise the residual case and route to--cookies-from-browserinstead of retrying blindly.Verification
Same URL, post-patch:
Scope
Six lines total (one
--extractor-argspair with comment, one SKILL.md bullet). No behaviour change for videos that already worked — the new client list is additive and ordered so existing successful paths are still hit first.Not in this PR
The 360p fallback (format 18) means on-screen text and code in screen-recordings will be harder for Claude to read at the default
--resolution 512. Worth flagging inSKILL.mdas "bump--resolutionto 1024 if reading on-screen text on a SABR-blocked source", but I'd land the unblock first and tune separately.