diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2011-11-15 10:35:39 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2011-11-15 10:35:59 +0100 |
commit | c3e4e7c1822493984e10baa2a9d39fa9dab2842e (patch) | |
tree | dd069dccaf79b8857532513b64bea3590ded9d4c | |
parent | 0fca93ac60cd18bbe67ed0e24d1ea8c33b27ab08 (diff) |
Fix youtube playlist IE match (Closes: #210)
-rwxr-xr-x | youtube-dl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube-dl b/youtube-dl index 30a02e5cd..fb66d64af 100755 --- a/youtube-dl +++ b/youtube-dl @@ -2470,7 +2470,7 @@ class YahooSearchIE(InfoExtractor): class YoutubePlaylistIE(InfoExtractor): """Information Extractor for YouTube playlists.""" - _VALID_URL = r'(?:https?://)?(?:\w+\.)?youtube\.com/(?:(?:course|view_play_list|my_playlists|artist|playlist)\?.*?(p|a|list)=|user/.*?/user/|p/|user/.*?#[pg]/c/)(?:PL)?([0-9A-Za-z]+)(?:/.*?/([0-9A-Za-z_-]+))?.*' + _VALID_URL = r'(?:https?://)?(?:\w+\.)?youtube\.com/(?:(?:course|view_play_list|my_playlists|artist|playlist)\?.*?(p|a|list)=|user/.*?/user/|p/|user/.*?#[pg]/c/)(?:PL)?([0-9A-Za-z-_]+)(?:/.*?/([0-9A-Za-z_-]+))?.*' _TEMPLATE_URL = 'http://www.youtube.com/%s?%s=%s&page=%s&gl=US&hl=en' _VIDEO_INDICATOR = r'/watch\?v=(.+?)&' _MORE_PAGES_INDICATOR = r'(?m)>\s*Next\s*</a>' @@ -2514,7 +2514,8 @@ class YoutubePlaylistIE(InfoExtractor): while True: self.report_download_page(playlist_id, pagenum) - request = urllib2.Request(self._TEMPLATE_URL % (playlist_access, playlist_prefix, playlist_id, pagenum)) + url = self._TEMPLATE_URL % (playlist_access, playlist_prefix, playlist_id, pagenum) + request = urllib2.Request(url) try: page = urllib2.urlopen(request).read() except (urllib2.URLError, httplib.HTTPException, socket.error), err: |