[youtube] Do not break upon unknown formats
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 23 Jan 2014 22:21:42 +0000 (23:21 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 23 Jan 2014 22:21:42 +0000 (23:21 +0100)
youtube_dl/extractor/youtube.py

index 6deb56447e5d01c64f68bd947c98dba8df82e7c2..8816f4f801b60eba8fed2042a2f3a7031c7a08c6 100644 (file)
@@ -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