]> jfr.im git - yt-dlp.git/commitdiff
[jsinterp] Fix bug in operator precedence
authorpukkandan <redacted>
Thu, 25 Aug 2022 04:06:32 +0000 (09:36 +0530)
committerpukkandan <redacted>
Thu, 25 Aug 2022 04:10:46 +0000 (09:40 +0530)
Fixes https://github.com/yt-dlp/yt-dlp/issues/4635#issuecomment-1226659543

test/test_youtube_signature.py
yt_dlp/jsinterp.py

index 4b526ff2e292ad644e2059b5d8295c6d99ae75a0..2f124a738c9f6816f5eb5f1009c3646c2be93523 100644 (file)
         'https://www.youtube.com/s/player/009f1d77/player_ias.vflset/en_US/base.js',
         '5dwFHw8aFWQUQtffRq', 'audescmLUzI3jw',
     ),
+    (
+        'https://www.youtube.com/s/player/dc0c6770/player_ias.vflset/en_US/base.js',
+        '5EHDMgYLV6HPGk_Mu-kk', 'n9lUJLHbxUI0GQ',
+    ),
 ]
 
 
index 2b68f53fae6ba9e2ff2fd6cf934c3987e7412158..1995e9d0e1a0d52f481986c22b071ce7884e27d9 100644 (file)
@@ -98,8 +98,8 @@ def _js_ternary(cndn, if_true=True, if_false=False):
     '&': _js_bit_op(operator.and_),
 
     '===': operator.is_,
-    '==': _js_eq_op(operator.eq),
     '!==': operator.is_not,
+    '==': _js_eq_op(operator.eq),
     '!=': _js_eq_op(operator.ne),
 
     '<=': _js_comp_op(operator.le),