aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/jsinterp.py
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2021-11-27 02:06:13 +0000
committerdirkf <fieldhouse@gmx.net>2022-01-30 00:05:54 +0000
commit1ca673bd98cc5bbfa76d00ac84ad5f6c1376db01 (patch)
treef2c44f44ae1d26e5d9a68f1c8f1cd69130519941 /youtube_dl/jsinterp.py
parente1eae16b56b5c57e341b000167c0a92e67095e6e (diff)
downloadyoutube-dl-1ca673bd98cc5bbfa76d00ac84ad5f6c1376db01.tar.xz
Fix splice to handle float
Needed for new youtube js player f1ca6900 Add https://github.com/yt-dlp/yt-dlp/commit/57dbe8077f8d00e0fffac53669f40cd7d584474f#diff-729b57caa8d006426f6a8960c061f519a8b6658682284015e069745af52ffb07
Diffstat (limited to 'youtube_dl/jsinterp.py')
-rw-r--r--youtube_dl/jsinterp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py
index c35765702..c75cf45b9 100644
--- a/youtube_dl/jsinterp.py
+++ b/youtube_dl/jsinterp.py
@@ -416,7 +416,7 @@ class JSInterpreter(object):
elif member == 'splice':
assertion(isinstance(obj, list), 'must be applied on a list')
assertion(argvals, 'takes one or more arguments')
- index, howMany = (argvals + [len(obj)])[:2]
+ index, howMany = map(int, (argvals + [len(obj)])[:2])
if index < 0:
index += len(obj)
add_items = argvals[2:]