From b8b47547049f5ebc3dd680fc7de70ed0ca9c0d70 Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Wed, 5 Mar 2025 00:22:52 -0600 Subject: [PATCH] [ie/twitter] Fix syndication token generation (#12537) Fix 14cd7f3443c6da4d49edaefcc12da9dee86e243e Authored by: bashonly --- yt_dlp/extractor/twitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/extractor/twitter.py b/yt_dlp/extractor/twitter.py index d32ae3f18..f3695cc06 100644 --- a/yt_dlp/extractor/twitter.py +++ b/yt_dlp/extractor/twitter.py @@ -1334,7 +1334,7 @@ class TwitterIE(TwitterBaseIE): def _generate_syndication_token(self, twid): # ((Number(twid) / 1e15) * Math.PI).toString(36).replace(/(0+|\.)/g, '') translation = str.maketrans(dict.fromkeys('0.')) - return js_number_to_string((int(twid) / 1e15) * math.PI, 36).translate(translation) + return js_number_to_string((int(twid) / 1e15) * math.pi, 36).translate(translation) def _call_syndication_api(self, twid): self.report_warning(