mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 17:18:01 +01:00
YoutubeIE: don't crash when trying to get automatic captions if the videos has standard subtitles.
This commit is contained in:
parent
88ae5991cd
commit
2f799533ae
1 changed files with 3 additions and 1 deletions
|
@ -270,7 +270,9 @@ def _request_automatic_caption(self, video_id, webpage):
|
|||
subtitles_url = caption_url + '&' + params
|
||||
sub = self._download_webpage(subtitles_url, video_id, u'Downloading automatic captions')
|
||||
return {sub_lang: sub}
|
||||
except KeyError:
|
||||
# An extractor error can be raise by the download process if there are
|
||||
# no automatic captions but there are subtitles
|
||||
except (KeyError, ExtractorError):
|
||||
self._downloader.report_warning(err_msg)
|
||||
return {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue