diff options
author | Jaime Marquínez Ferrándiz <[email protected]> | 2013-03-31 12:19:13 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <[email protected]> | 2013-03-31 12:19:13 +0200 |
commit | ef767f9fd5e852940de999da4962657bca452c0d (patch) | |
tree | da31cd839951a00fa22d8365ef8ea2b6730cabd3 | |
parent | bc97f6d60ceacdaffe6a6dbfd403a08ce06229eb (diff) | |
download | youtube-dl-ef767f9fd5e852940de999da4962657bca452c0d.tar.gz youtube-dl-ef767f9fd5e852940de999da4962657bca452c0d.zip |
Fix crash when subtitles are not found and the option --all-subs is given
-rwxr-xr-x | youtube_dl/InfoExtractors.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 13b1f99b5..1bd9e25c4 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -309,6 +309,8 @@ class YoutubeIE(InfoExtractor): def _extract_all_subtitles(self, video_id): sub_lang_list = self._get_available_subtitles(video_id) sub_format = self._downloader.params.get('subtitlesformat') + if isinstance(sub_lang_list,tuple): #There was some error, it didn't get the available subtitles + return [(sub_lang_list[0], None, None)] subtitles = [] for sub_lang in sub_lang_list: subtitle = self._request_subtitle(sub_lang, sub_lang_list[sub_lang].encode('utf-8'), video_id, sub_format) |