]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[subtittles] Check that the result is not empty
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 4 Feb 2014 09:24:17 +0000 (10:24 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 4 Feb 2014 09:24:17 +0000 (10:24 +0100)
youtube_dl/extractor/subtitles.py

index 6b3027782bff3cd4424704e993766b78282ca3ba..db33745c14472f7f3e7749978585f0b2b2c53af2 100644 (file)
@@ -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)))
             return
         if not sub:
             self._downloader.report_warning(u'Did not fetch video subtitles')
             return
+        return sub
 
     def _get_available_subtitles(self, video_id, webpage):
         """