mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-11-25 21:10:35 +02:00
[ie/youtube] Apply temporary STS workaround (#18126)
Authored by: bashonly
This commit is contained in:
@@ -2242,7 +2242,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
|
||||
sts = traverse_obj(ytcfg, ('STS', {int_or_none}))
|
||||
if sts:
|
||||
return sts
|
||||
# TODO: Revert to `return sts` immediately when reworking STS/variant handling!
|
||||
# XXX: If any supported (i.e. non-`tcl`) variants start using >5 digit STS,
|
||||
# then the line of code below is dead wrong and actively harmful!
|
||||
# XXX: If clients other than tv_downgraded start seeing "the page needs to be reloaded"
|
||||
# errors, this STS truncation is the likely culprit! Revert it!
|
||||
return int(str(sts)[:5])
|
||||
|
||||
if not player_url:
|
||||
error_msg = 'Cannot extract signature timestamp without player url'
|
||||
|
||||
Reference in New Issue
Block a user