mirror of
https://github.com/l1ving/youtube-dl
synced 2026-06-05 23:03:33 +08:00
[utils] Using non capturing groups in js_to_json
This commit is contained in:
+2
-2
@@ -2112,8 +2112,8 @@ def js_to_json(code):
|
||||
return re.sub(r'''(?sx)
|
||||
"(?:[^"\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^"\\]*"|
|
||||
'(?:[^'\\]*(?:\\\\|\\['"nurtbfx/\n]))*[^'\\]*'|
|
||||
,(?=(\s|(/\*((?!\*/)(\n|.))*\*/))*[\]}])|
|
||||
/\*((?!\*/)(\n|.))*\*/|[a-zA-Z_][.a-zA-Z_0-9]*|
|
||||
,(?=(?:\s|(?:/\*(?:(?!\*/)(?:\n|.))*\*/))*[\]}])|
|
||||
/\*(?:(?!\*/)(?:\n|.))*\*/|[a-zA-Z_][.a-zA-Z_0-9]*|
|
||||
\b(?:0[xX][0-9a-fA-F]+|0+[0-7]+)(?:\s*:)?|
|
||||
[0-9]+(?=\s*:)
|
||||
''', fix_kv, code)
|
||||
|
||||
Reference in New Issue
Block a user