1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 00:25:08 +00:00

[extractor] Add default parameter to _search_json (#4057)

Authored by: pukkandan, coletdjnz
This commit is contained in:
coletdev
2022-06-19 00:55:18 +00:00
committed by GitHub
parent 9fde8a6b12
commit f0bc6e2019
2 changed files with 26 additions and 7 deletions

View File

@ -486,9 +486,9 @@ class YoutubeWebArchiveIE(InfoExtractor):
search_meta = ((lambda x: self._html_search_meta(x, webpage, default=None)) if webpage else (lambda x: None))
player_response = self._search_json(
self._YT_INITIAL_PLAYER_RESPONSE_RE, webpage, 'initial player response',
video_id, fatal=False)
video_id, default={})
initial_data = self._search_json(
self._YT_INITIAL_DATA_RE, webpage, 'initial data', video_id, fatal=False)
self._YT_INITIAL_DATA_RE, webpage, 'initial data', video_id, default={})
initial_data_video = traverse_obj(
initial_data, ('contents', 'twoColumnWatchNextResults', 'results', 'results', 'contents', ..., 'videoPrimaryInfoRenderer'),