aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/subtitles.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-02-04 10:24:17 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-02-04 10:24:17 +0100
commit5cef4ff09b8e77daab03b1cca508a941b5fd5fa0 (patch)
treeab3c1ff2b6e3d44b75782d58a0e6819cc32413a7 /youtube_dl/extractor/subtitles.py
parent91264ce5728bbe7e560c13dc7a047b083dd67d7e (diff)
[subtittles] Check that the result is not empty
Diffstat (limited to 'youtube_dl/extractor/subtitles.py')
-rw-r--r--youtube_dl/extractor/subtitles.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/subtitles.py b/youtube_dl/extractor/subtitles.py
index 6b3027782..db33745c1 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)))
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):
"""