diff options
author | pukkandan <[email protected]> | 2022-09-02 20:41:39 +0530 |
---|---|---|
committer | dirkf <[email protected]> | 2022-09-03 00:53:56 +0100 |
commit | 7009bb9f3182449ae8cc05cc28b768b63030a485 (patch) | |
tree | 7d488aa5de12ace69991d1b4622ea630ad8b4255 | |
parent | 218c423bc042674a8834ffc09520a94fbbe7b138 (diff) | |
download | youtube-dl-7009bb9f3182449ae8cc05cc28b768b63030a485.tar.gz youtube-dl-7009bb9f3182449ae8cc05cc28b768b63030a485.zip |
[jsinterp] Workaround operator associativity issue
* temporary fix for player 5a3b6271 [1]
1. https://github.com/yt-dlp/yt-dlp/issues/4635#issuecomment-1235384480
-rw-r--r-- | test/test_youtube_signature.py | 4 | ||||
-rw-r--r-- | youtube_dl/jsinterp.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/test/test_youtube_signature.py b/test/test_youtube_signature.py index ec914a871..4e678cae0 100644 --- a/test/test_youtube_signature.py +++ b/test/test_youtube_signature.py @@ -131,6 +131,10 @@ _NSIG_TESTS = [ 'https://www.youtube.com/s/player/c57c113c/player_ias.vflset/en_US/base.js', '-Txvy6bT5R6LqgnQNx', 'dcklJCnRUHbgSg', ), + ( + 'https://www.youtube.com/s/player/5a3b6271/player_ias.vflset/en_US/base.js', + 'B2j7f_UPT4rfje85Lu_e', 'm5DmNymaGQ5RdQ', + ), ] diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py index d13329396..99dd98435 100644 --- a/youtube_dl/jsinterp.py +++ b/youtube_dl/jsinterp.py @@ -107,8 +107,8 @@ _OPERATORS = ( ('+', _js_arith_op(operator.add)), ('-', _js_arith_op(operator.sub)), ('*', _js_arith_op(operator.mul)), - ('/', _js_div), ('%', _js_mod), + ('/', _js_div), ('**', _js_exp), ) |