diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-10-04 02:44:55 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-10-06 05:45:19 +0530 |
commit | 1276a43a77144567fc575d6aaec5b5f8468b7d56 (patch) | |
tree | a1dea74a4039ccd5e3e948dc551217611fead276 | |
parent | 519804a92fbc065e35b752ca160dcef3f3656ef7 (diff) | |
download | hypervideo-pre-1276a43a77144567fc575d6aaec5b5f8468b7d56.tar.lz hypervideo-pre-1276a43a77144567fc575d6aaec5b5f8468b7d56.tar.xz hypervideo-pre-1276a43a77144567fc575d6aaec5b5f8468b7d56.zip |
[youtube] Fix non-fatal errors in fetching player
-rw-r--r-- | yt_dlp/extractor/youtube.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 159b0a3b9..56de2ef59 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -1911,10 +1911,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor): def _load_player(self, video_id, player_url, fatal=True) -> bool: player_id = self._extract_player_info(player_url) if player_id not in self._code_cache: - self._code_cache[player_id] = self._download_webpage( + code = self._download_webpage( player_url, video_id, fatal=fatal, note='Downloading player ' + player_id, errnote='Download of %s failed' % player_url) + if code: + self._code_cache[player_id] = code return player_id in self._code_cache def _extract_signature_function(self, video_id, player_url, example_sig): |