diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 34650cf4e1..570f8195ce 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -1647,7 +1647,10 @@ class InfoExtractor: FUNCTION_RE = r'\(function\((?P.*?)\){return\s+(?P{.*?})\s*;?\s*}\((?P.*?)\)' js, arg_keys, arg_vals = self._search_regex( (rf'', rf'{rectx}\(.*?{FUNCTION_RE}'), - webpage, context_name, group=('js', 'arg_keys', 'arg_vals'), fatal=fatal) + webpage, context_name, group=('js', 'arg_keys', 'arg_vals'), + default=NO_DEFAULT if fatal else (None, None, None)) + if js is None: + return {} args = dict(zip(arg_keys.split(','), arg_vals.split(',')))