]> jfr.im git - yt-dlp.git/commitdiff
[jsinterp] Workaround operator associativity issue
authorpukkandan <redacted>
Fri, 2 Sep 2022 15:11:39 +0000 (20:41 +0530)
committerpukkandan <redacted>
Fri, 2 Sep 2022 15:15:55 +0000 (20:45 +0530)
https://github.com/yt-dlp/yt-dlp/issues/4635#issuecomment-1235384480

test/test_youtube_signature.py
yt_dlp/jsinterp.py

index b1c5cb2b3519b0ef1bd3294e689ea689cb39d6d4..c3dcb4d68ff11c0474a1891614603265e76d58e0 100644 (file)
         'https://www.youtube.com/s/player/c57c113c/player_ias.vflset/en_US/base.js',
         'M92UUMHa8PdvPd3wyM', '3hPqLJsiNZx7yA',
     ),
+    (
+        'https://www.youtube.com/s/player/5a3b6271/player_ias.vflset/en_US/base.js',
+        'B2j7f_UPT4rfje85Lu_e', 'm5DmNymaGQ5RdQ',
+    ),
 ]
 
 
index 2bb4acf3e7d6b89f6eb73dc130577ecbfb1d1d45..4caad6f743089b54f310ea69ab4f7e8d7ec75abf 100644 (file)
@@ -117,8 +117,8 @@ def _js_ternary(cndn, if_true=True, if_false=False):
     '-': _js_arith_op(operator.sub),
 
     '*': _js_arith_op(operator.mul),
-    '/': _js_div,
     '%': _js_mod,
+    '/': _js_div,
     '**': _js_exp,
 }