From: Philipp Hagemeister Date: Thu, 23 Jan 2014 22:21:42 +0000 (+0100) Subject: [youtube] Do not break upon unknown formats X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=0b65e5d40f9d6d9a25fd463a4ab0db95022c534e;p=youtube-dl [youtube] Do not break upon unknown formats --- 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