[extractor/youtube] Improve nsig function name extraction
This commit is contained in:
parent
b4e0d75848
commit
cd810afe2a
2 changed files with 5 additions and 1 deletions
|
|
@ -3140,7 +3140,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||
return funcname
|
||||
|
||||
return json.loads(js_to_json(self._search_regex(
|
||||
rf'var {re.escape(funcname)}\s*=\s*(\[.+?\]);', jscode,
|
||||
rf'var {re.escape(funcname)}\s*=\s*(\[.+?\])[,;]', jscode,
|
||||
f'Initial JS player n function list ({funcname}.{idx})')))[int(idx)]
|
||||
|
||||
def _extract_n_function_code(self, video_id, player_url):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue