Repository navigation
Conversation
Some variants of a player can't be solved: with player_ias_tcl of 983e9c18, n and sig both fail with "no solutions", while player_ias of the same player works. yt-dlp fetches the main variant by default for the same reason.
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
Fixes #153.
YouTube is serving player
983e9c18asplayer_ias_tcl.vflset/en_US/base.jsto some requests. The helper finds no n or sig function in that variant, so every challenge fails withno solutions:. The main variant of the same player,983e9c18/player_ias.vflset/en_US/base.js, solves both n and sig.yt-dlp has the same rule: it rewrites every player URL to the
mainvariant by default (_DEFAULT_PLAYER_JS_VARIANT = 'main',player_ias.vflset/en_US/base.js).Change:
Extraction.jsURL(html:)keeps the player ID (orPLAYER_ID_OVERRIDE) and replaces the variant path withplayer_ias.vflset/en_US/base.js. One new test checks that aplayer_ias_tclURL comes back as the main variant.Testing:
ExtractionTests,NSigTests, andSignatureTestspass..localonly. Each run found streams and then fetched the first 64 KB of itag 140, waiting out the usual first-seconds 403s. All 14 runs returned 206, and most got player 983e9c18. Before the change, 4 of 28 extractions failed, all on 983e9c18 tcl.Note
Overview YouTubeKit now fetches the main YouTube player JavaScript variant (
/player_ias.vflset/en_US/base.js) even when the page advertises a variant such asplayer_ias_tclthat can prevent signature extraction.Player selection
Extraction.jsURLkeeps the player ID discovered on the page unlessPLAYER_ID_OVERRIDEis configured. It uses that ID to build the main variant’s URL.