0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-22 02:15:12 +00:00

[youtube] Fix non-fatal errors in fetching player

This commit is contained in:
pukkandan 2021-10-04 02:44:55 +05:30
parent 519804a92f
commit 1276a43a77
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698

View file

@ -1911,10 +1911,12 @@ def _extract_player_info(cls, player_url):
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):