projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
YoutubeIE: don't crash when trying to get automatic captions if the videos has standa...
[youtube-dl]
/
youtube_dl
/
extractor
/
youtube.py
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 30036524f9b0542c3629552f19cbb0634355e4cb..2b03226f60ede0545497d1386f7ad4e3c6d32ba8 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-270,7
+270,9
@@
class YoutubeIE(InfoExtractor):
subtitles_url = caption_url + '&' + params
sub = self._download_webpage(subtitles_url, video_id, u'Downloading automatic captions')
return {sub_lang: sub}
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 {}
self._downloader.report_warning(err_msg)
return {}