diff --git a/yt_dlp/extractor/youtube/_video.py b/yt_dlp/extractor/youtube/_video.py index b58cb2dc64..fba53c7380 100644 --- a/yt_dlp/extractor/youtube/_video.py +++ b/yt_dlp/extractor/youtube/_video.py @@ -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'