]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Add 'signature' to YouTube URLs, fixes #427
authorDanko Alexeyev <danko@very.lv>
Thu, 27 Sep 2012 06:44:49 +0000 (09:44 +0300)
committerDanko Alexeyev <danko@very.lv>
Thu, 27 Sep 2012 06:44:49 +0000 (09:44 +0300)
youtube_dl/InfoExtractors.py

index d95423f7db63985742c44fb43869f668011c9fae..8dd1c0b0727ff3bcb6001a460aa7b892f529d586 100644 (file)
@@ -402,7 +402,7 @@ class YoutubeIE(InfoExtractor):
                        url_data_strs = video_info['url_encoded_fmt_stream_map'][0].split(',')
                        url_data = [parse_qs(uds) for uds in url_data_strs]
                        url_data = filter(lambda ud: 'itag' in ud and 'url' in ud, url_data)
-                       url_map = dict((ud['itag'][0], ud['url'][0]) for ud in url_data)
+                       url_map = dict((ud['itag'][0], ud['url'][0] + '&signature=' + ud['sig'][0]) for ud in url_data)
 
                        format_limit = self._downloader.params.get('format_limit', None)
                        available_formats = self._available_formats_prefer_free if self._downloader.params.get('prefer_free_formats', False) else self._available_formats