aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/utils.py
diff options
context:
space:
mode:
authorChillingPepper <90042155+ChillingPepper@users.noreply.github.com>2021-09-04 14:29:35 +0200
committerGitHub <noreply@github.com>2021-09-04 17:59:35 +0530
commit421ddcb8b4712f41c6060b6d651ec8dc7d4b139a (patch)
tree2011ea6e74d3a6ff71a542e79ab9c30aa9859feb /yt_dlp/utils.py
parentc0ac49bcca766c4487fb25f5124bfb4dba331b9c (diff)
downloadhypervideo-pre-421ddcb8b4712f41c6060b6d651ec8dc7d4b139a.tar.lz
hypervideo-pre-421ddcb8b4712f41c6060b6d651ec8dc7d4b139a.tar.xz
hypervideo-pre-421ddcb8b4712f41c6060b6d651ec8dc7d4b139a.zip
[SovietsCloset] Add extractor (#884)
Authored by: ChillingPepper
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r--yt_dlp/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index 65d585d05..cdf4c0755 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -4387,6 +4387,8 @@ def js_to_json(code, vars={}):
v = m.group(0)
if v in ('true', 'false', 'null'):
return v
+ elif v in ('undefined', 'void 0'):
+ return 'null'
elif v.startswith('/*') or v.startswith('//') or v.startswith('!') or v == ',':
return ""
@@ -4413,7 +4415,7 @@ def js_to_json(code, vars={}):
"(?:[^"\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^"\\]*"|
'(?:[^'\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^'\\]*'|
{comment}|,(?={skip}[\]}}])|
- (?:(?<![0-9])[eE]|[a-df-zA-DF-Z_])[.a-zA-Z_0-9]*|
+ void\s0|(?:(?<![0-9])[eE]|[a-df-zA-DF-Z_$])[.a-zA-Z_$0-9]*|
\b(?:0[xX][0-9a-fA-F]+|0+[0-7]+)(?:{skip}:)?|
[0-9]+(?={skip}:)|
!+