A feature-rich command-line audio/video downloader
[subtittles] Check that the result is not empty
Philipp Hagemeister5cef4ff09b8e
diff --git a/youtube_dl/extractor/subtitles.py b/youtube_dl/extractor/subtitles.pyindex 6b3027782b..db33745c14 100644--- a/youtube_dl/extractor/subtitles.py+++ b/youtube_dl/extractor/subtitles.py@@ -68,13 +68,14 @@ class SubtitlesInfoExtractor(InfoExtractor):def _request_subtitle_url(self, sub_lang, url):""" makes the http request for the subtitle """try:- return self._download_subtitle_url(sub_lang, url)+ sub = self._download_subtitle_url(sub_lang, url)except ExtractorError as err:self._downloader.report_warning(u'unable to download video subtitles for %s: %s' % (sub_lang, compat_str(err)))returnif not sub:self._downloader.report_warning(u'Did not fetch video subtitles')return+ return subdef _get_available_subtitles(self, video_id, webpage):"""