[ie/youtube] Apply temporary STS workaround (#18126)

Authored by: bashonly
This commit is contained in:
bashonly
2026-11-23 16:12:47 +00:00
committed by GitHub
parent fa9a87158b
commit b2e6bb0dd4
+6 -1
View File
@@ -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'