mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 09:07:58 +01:00
[youtube] Escape possible $
in _extract_n_function_name
regex
This commit is contained in:
parent
febff4c119
commit
a7d4acc018
1 changed files with 1 additions and 1 deletions
|
@ -2418,7 +2418,7 @@ def _extract_n_function_name(self, jscode):
|
||||||
if not idx:
|
if not idx:
|
||||||
return nfunc
|
return nfunc
|
||||||
return json.loads(js_to_json(self._search_regex(
|
return json.loads(js_to_json(self._search_regex(
|
||||||
rf'var {nfunc}\s*=\s*(\[.+?\]);', jscode,
|
rf'var {re.escape(nfunc)}\s*=\s*(\[.+?\]);', jscode,
|
||||||
f'Initial JS player n function list ({nfunc}.{idx})')))[int(idx)]
|
f'Initial JS player n function list ({nfunc}.{idx})')))[int(idx)]
|
||||||
|
|
||||||
def _extract_n_function(self, video_id, player_url):
|
def _extract_n_function(self, video_id, player_url):
|
||||||
|
|
Loading…
Reference in a new issue