Skip to content

Commit

Permalink
[jsinterp] Workaround operator associativity issue
Browse files Browse the repository at this point in the history
* temporary fix for player 5a3b6271 [1]

1. yt-dlp/yt-dlp#4635 (comment)
  • Loading branch information
pukkandan authored and belamenso committed Sep 19, 2022
1 parent c342d50 commit 5662dad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/test_youtube_signature.py
Expand Up @@ -131,6 +131,10 @@
'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',
),
]


Expand Down
2 changes: 1 addition & 1 deletion youtube_dl/jsinterp.py
Expand Up @@ -107,8 +107,8 @@ def _js_ternary(cndn, if_true=True, if_false=False):
('+', _js_arith_op(operator.add)),
('-', _js_arith_op(operator.sub)),
('*', _js_arith_op(operator.mul)),
('/', _js_div),
('%', _js_mod),
('/', _js_div),
('**', _js_exp),
)

Expand Down

0 comments on commit 5662dad

Please sign in to comment.