diff options
author | coletdev <coletdjnz@protonmail.com> | 2022-06-19 00:55:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-18 17:55:18 -0700 |
commit | f0bc6e2019a2f81d358ebddc4ae4cf8e9e4ed905 (patch) | |
tree | 53d58302032bb3a9cd314591ba3cb872384d1ba3 /yt_dlp/extractor/archiveorg.py | |
parent | 9fde8a6b125466419745bfc2afed1f34f9821b3f (diff) | |
download | hypervideo-pre-f0bc6e2019a2f81d358ebddc4ae4cf8e9e4ed905.tar.lz hypervideo-pre-f0bc6e2019a2f81d358ebddc4ae4cf8e9e4ed905.tar.xz hypervideo-pre-f0bc6e2019a2f81d358ebddc4ae4cf8e9e4ed905.zip |
[extractor] Add `default` parameter to `_search_json` (#4057)
Authored by: pukkandan, coletdjnz
Diffstat (limited to 'yt_dlp/extractor/archiveorg.py')
-rw-r--r-- | yt_dlp/extractor/archiveorg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/extractor/archiveorg.py b/yt_dlp/extractor/archiveorg.py index c1c9b0adf..179602d46 100644 --- a/yt_dlp/extractor/archiveorg.py +++ b/yt_dlp/extractor/archiveorg.py @@ -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'), |