aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRogério Brito <rbrito@ime.usp.br>2011-10-03 21:36:32 -0300
committerRogério Brito <rbrito@ime.usp.br>2011-10-03 21:41:33 -0300
commit7125a7ca8b5e5228a8199cb95779f83fd3ee05e2 (patch)
tree0a859b3000ad3af1fab353ee2acc0ec0425fa837
parent54d47874f7bff1688c7109b75abd0af55cc4c89e (diff)
Support "newstyle" Youtube playlist IDs.
Many playlists reported by Youtube now have the form like in: http://www.youtube.com/playlist?list=PL520044A3524F5E5D where `PL` is prefixed to what youtube-dl used to use as playlist IDs. So, while matching it, we adapt the regular expression so as to discard the `PL` and only get the `520044A3524F5E5D` in the case of the playlist of the example.
-rwxr-xr-xyoutube-dl2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube-dl b/youtube-dl
index e701a60e2..d3582c442 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -2458,7 +2458,7 @@ class YahooSearchIE(InfoExtractor):
class YoutubePlaylistIE(InfoExtractor):
"""Information Extractor for YouTube playlists."""
- _VALID_URL = r'(?:https?://)?(?:\w+\.)?youtube\.com/(?:(?:view_play_list|my_playlists|artist|playlist)\?.*?(p|a|list)=|user/.*?/user/|p/|user/.*?#[pg]/c/)([0-9A-Za-z]+)(?:/.*?/([0-9A-Za-z_-]+))?.*'
+ _VALID_URL = r'(?:https?://)?(?:\w+\.)?youtube\.com/(?:(?: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>'