mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[extractor/common] Fix _search_nuxt_data
(#6062)
Authored by: LowSuggestion912
This commit is contained in:
parent
417cdaae08
commit
b23167e754
1 changed files with 2 additions and 5 deletions
|
@ -1670,11 +1670,8 @@ def _search_nuxt_data(self, webpage, video_id, context_name='__NUXT__', *, fatal
|
||||||
if js is None:
|
if js is None:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
args = dict(zip(arg_keys.split(','), arg_vals.split(',')))
|
args = dict(zip(arg_keys.split(','), map(json.dumps, self._parse_json(
|
||||||
|
f'[{arg_vals}]', video_id, transform_source=js_to_json, fatal=fatal) or ())))
|
||||||
for key, val in args.items():
|
|
||||||
if val in ('undefined', 'void 0'):
|
|
||||||
args[key] = 'null'
|
|
||||||
|
|
||||||
ret = self._parse_json(js, video_id, transform_source=functools.partial(js_to_json, vars=args), fatal=fatal)
|
ret = self._parse_json(js, video_id, transform_source=functools.partial(js_to_json, vars=args), fatal=fatal)
|
||||||
return traverse_obj(ret, traverse) or {}
|
return traverse_obj(ret, traverse) or {}
|
||||||
|
|
Loading…
Reference in a new issue