mirror of https://github.com/yt-dlp/yt-dlp.git
parent
85a802969e
commit
b44cd29851
|
@ -343,7 +343,8 @@ class JSInterpreter:
|
||||||
inner, outer = self._separate(expr, expr[0], 1)
|
inner, outer = self._separate(expr, expr[0], 1)
|
||||||
if expr[0] == '/':
|
if expr[0] == '/':
|
||||||
flags, outer = self._regex_flags(outer)
|
flags, outer = self._regex_flags(outer)
|
||||||
inner = re.compile(inner[1:], flags=flags)
|
# Avoid https://github.com/python/cpython/issues/74534
|
||||||
|
inner = re.compile(inner[1:].replace('[[', r'[\['), flags=flags)
|
||||||
else:
|
else:
|
||||||
inner = json.loads(js_to_json(f'{inner}{expr[0]}', strict=True))
|
inner = json.loads(js_to_json(f'{inner}{expr[0]}', strict=True))
|
||||||
if not outer:
|
if not outer:
|
||||||
|
|
Loading…
Reference in New Issue