From 0b65e5d40f9d6d9a25fd463a4ab0db95022c534e Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Thu, 23 Jan 2014 23:21:42 +0100 Subject: [PATCH] [youtube] Do not break upon unknown formats --- youtube_dl/extractor/youtube.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 6deb56447..8816f4f80 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1290,7 +1290,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor): 'url': video_real_url, 'player_url': player_url, } - dct.update(self._formats[itag]) + if itag in self._formats: + dct.update(self._formats[itag]) formats.append(dct) return formats