[jsinterp] Fix bug in operator precedence

Fixes https://github.com/yt-dlp/yt-dlp/issues/4635#issuecomment-1226659543
pull/4762/head
pukkandan 2 years ago
parent e5458d1d88
commit 164b03c486
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

@ -114,6 +114,10 @@ _NSIG_TESTS = [
'https://www.youtube.com/s/player/009f1d77/player_ias.vflset/en_US/base.js', 'https://www.youtube.com/s/player/009f1d77/player_ias.vflset/en_US/base.js',
'5dwFHw8aFWQUQtffRq', 'audescmLUzI3jw', '5dwFHw8aFWQUQtffRq', 'audescmLUzI3jw',
), ),
(
'https://www.youtube.com/s/player/dc0c6770/player_ias.vflset/en_US/base.js',
'5EHDMgYLV6HPGk_Mu-kk', 'n9lUJLHbxUI0GQ',
),
] ]

@ -98,8 +98,8 @@ _OPERATORS = { # None => Defined in JSInterpreter._operator
'&': _js_bit_op(operator.and_), '&': _js_bit_op(operator.and_),
'===': operator.is_, '===': operator.is_,
'==': _js_eq_op(operator.eq),
'!==': operator.is_not, '!==': operator.is_not,
'==': _js_eq_op(operator.eq),
'!=': _js_eq_op(operator.ne), '!=': _js_eq_op(operator.ne),
'<=': _js_comp_op(operator.le), '<=': _js_comp_op(operator.le),

Loading…
Cancel
Save