[YouTube] Fix HTTP 403 on DASH fragments by adding android_vr client#33246
[YouTube] Fix HTTP 403 on DASH fragments by adding android_vr client#33246dcsoft4 wants to merge 3 commits intoytdl-org:masterfrom
Conversation
- Add android_vr (Oculus Quest 3) as first-priority InnerTube client, replacing android_sdkless which is now blocked by YouTube's CDN - Remove break on n parameter that prevented all formats from being added - Set client User-Agent on format download headers to avoid CDN mismatch Ref: yt-dlp/yt-dlp#15726 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for your work and its suspiciously literate and detailed explanation. I don't think you (or your assistant) fully understand the somewhat half-hacked code in the current extractor version. Until an external JS solution like that in yt-dlp is added, there won't be any unthrottling. That's why we need whichever format is sent without the n-challenge: today it's Android VR. Anyhow, #33244. |
|
Thanks, this working |
|
@dirkf I reverted the n parameter break as requested, please review again when you have a chance, thanks! |
Fix HTTP 403 on DASH fragments by adding android_vr client (ytdl-org#33246)
| 'INNERTUBE_CONTEXT': { | ||
| 'client': { | ||
| 'clientName': 'ANDROID_VR', | ||
| 'clientVersion': '1.62.27', |
There was a problem hiding this comment.
From yt-dlp/yt-dlp#16150 (comment), the version can be this later one, but not later.
| 'clientVersion': '1.62.27', | |
| 'clientVersion': '1.65.10', |
There was a problem hiding this comment.
If you do that remember to also change the version number in the user agent 4 lines below (I forgot to do that in the linked comment)
Co-authored-by: dirkf <fieldhouse@gmx.net>
dcsoft4
left a comment
There was a problem hiding this comment.
userAgent version updated to 1.65.10 as requested
Bug
Downloading videos with
-f bestvideo+bestaudiofails with repeatedHTTP Error 403: Forbiddenon DASH audio fragments. All 10 retry attempts fail.Verbose output
Root cause
The
android_sdklessInnerTube client has become unreliable — YouTube's CDN now blocks its streaming URLs after a few range-based fragment requests. This was identified and fixed in yt-dlp (yt-dlp/yt-dlp#15726), which replacedandroid_sdklesswithandroid_vr.Changes
android_vrclient (Oculus Quest 3) as first-priority InnerTube client. Likeandroid_sdkless, it does not require a JS player or PO Token, but its streaming URLs are not blocked by YouTube's CDNbreakonnparameter in the format loop. Thebreak(added in5d445f8c5) prevented all formats from being added when any URL contained annparameter, and also prevented_unthrottle_format_urlsfrom ever being reachedReferences