From: Rogério Brito Date: Fri, 28 Sep 2012 05:27:11 +0000 (-0300) Subject: Imported Upstream version 2012.09.27 X-Git-Url: https://git.rapsys.eu/youtubedl/commitdiff_plain/216a0cb32fd479f712fb935fb877aa1aebce7426?hp=fa9caede2ef0b8d916bf9c4c7be902d624afc1f0 Imported Upstream version 2012.09.27 --- diff --git a/LATEST_VERSION b/LATEST_VERSION index 0c8dc50..88c5427 100644 --- a/LATEST_VERSION +++ b/LATEST_VERSION @@ -1 +1 @@ -2012.02.27 +2012.09.27 diff --git a/youtube-dl b/youtube-dl index f2268af..21e604a 100755 Binary files a/youtube-dl and b/youtube-dl differ diff --git a/youtube-dl.exe b/youtube-dl.exe new file mode 100755 index 0000000..2aa052c Binary files /dev/null and b/youtube-dl.exe differ diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index ddb4aa1..8dd1c0b 100644 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -95,7 +95,7 @@ class InfoExtractor(object): class YoutubeIE(InfoExtractor): """Information extractor for youtube.com.""" - _VALID_URL = r'^((?:https?://)?(?:youtu\.be/|(?:\w+\.)?youtube(?:-nocookie)?\.com/)(?!view_play_list|my_playlists|artist|playlist)(?:(?:(?:v|embed|e)/)|(?:(?:watch(?:_popup)?(?:\.php)?)?(?:\?|#!?)(?:.+&)?v=))?)?([0-9A-Za-z_-]+)(?(1).+)?$' + _VALID_URL = r'^((?:https?://)?(?:youtu\.be/|(?:\w+\.)?youtube(?:-nocookie)?\.com/|tube.majestyc.net/)(?!view_play_list|my_playlists|artist|playlist)(?:(?:(?:v|embed|e)/)|(?:(?:watch(?:_popup)?(?:\.php)?)?(?:\?|#!?)(?:.+&)?v=))?)?([0-9A-Za-z_-]+)(?(1).+)?$' _LANG_URL = r'http://www.youtube.com/?hl=en&persist_hl=1&gl=US&persist_gl=1&opt_out_ackd=1' _LOGIN_URL = 'https://www.youtube.com/signup?next=/&gl=US&hl=en' _AGE_URL = 'http://www.youtube.com/verify_age?next_url=/&gl=US&hl=en' @@ -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 diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 8695184..0122f72 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -19,7 +19,7 @@ __authors__ = ( ) __license__ = 'Public Domain' -__version__ = '2012.02.27' +__version__ = '2012.09.27' UPDATE_URL = 'https://raw.github.com/rg3/youtube-dl/master/youtube-dl' UPDATE_URL_VERSION = 'https://raw.github.com/rg3/youtube-dl/master/LATEST_VERSION' diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 2853ba5..922e17e 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -223,7 +223,7 @@ def encodeFilename(s): assert type(s) == type(u'') - if sys.platform == 'win32' and sys.getwindowsversion().major >= 5: + if sys.platform == 'win32' and sys.getwindowsversion()[0] >= 5: # Pass u'' directly to use Unicode APIs on Windows 2000 and up # (Detecting Windows NT 4 is tricky because 'major >= 4' would # match Windows 9x series as well. Besides, NT 4 is obsolete.)