mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-10 00:35:13 +01:00
[jsinterp] Fix division (#7279)
* Fixes nsig decryption for Youtube JS player `8c7583ff` Authored by: bashonly
This commit is contained in:
parent
4f7b11cc1c
commit
b4a252fba8
3 changed files with 12 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ def _js_arith_op(op):
|
|||
|
||||
|
||||
def _js_div(a, b):
|
||||
if JS_Undefined in (a, b) or not (a and b):
|
||||
if JS_Undefined in (a, b) or not (a or b):
|
||||
return float('nan')
|
||||
return (a or 0) / b if b else float('inf')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue