youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 5cef4ff09b8e77daab03b1cca508a941b5fd5fa0
parent 91264ce5728bbe7e560c13dc7a047b083dd67d7e
Author: Philipp Hagemeister <phihag@phihag.de>
Date:   Tue,  4 Feb 2014 10:24:17 +0100

[subtittles] Check that the result is not empty

Diffstat:
Myoutube_dl/extractor/subtitles.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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): """