Fix YoutubeIE after recent YouTube changes (closes #34)
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Thu, 9 Dec 2010 18:22:32 +0000 (19:22 +0100)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Thu, 9 Dec 2010 18:22:32 +0000 (19:22 +0100)
youtube-dl

index d60fa60c9ea3b9ef162dbc1114332fcd1f850ddd..415cf707379ca7bc667e0900372f9d7884f0675e 100755 (executable)
@@ -955,9 +955,9 @@ class YoutubeIE(InfoExtractor):
                                self._downloader.trouble(u'ERROR: no known formats available for video')
                                return
                        if requested_format is None:
-                               video_url_list = [(existing_formats[0], get_video_template % existing_formats[0])] # Best quality
+                               video_url_list = [(existing_formats[0], url_map[existing_formats[0]])] # Best quality
                        elif requested_format == '-1':
-                               video_url_list = [(f, get_video_template % f) for f in existing_formats] # All formats
+                               video_url_list = [(f, url_map[f]) for f in existing_formats] # All formats
                        else:
                                video_url_list = [(requested_format, get_video_template % requested_format)] # Specific format