From d69983a8756fa75e16606bcd1b2ba50ec115ed16 Mon Sep 17 00:00:00 2001 From: dirkf Date: Tue, 23 Nov 2021 18:53:35 +0000 Subject: [PATCH] Update for player f1ca6900 Numbers can be float literals, eg '1E3' --- youtube_dl/extractor/youtube.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index da73e130c2f..e61157bfafc 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1589,9 +1589,9 @@ def remove(s, i): elif re.match(r'^"[^"]*",', datac): el, datac = find_first(r'(?s)^"([^"]*)",\s*(.*)$', datac, groups=True) # Integer input data - elif re.match(r'^-?\d+,', datac): + elif re.match(r'^-?\d+(?:E\d+)?,', datac): el, datac = find_first(r"(?s)^(.*?),\s*(.*)$", datac, groups=True) - el = int(el) + el = int(float(el) if 'E' in el else el) # Reference to "n" parameter array elif re.match('^b,', datac): el = n