mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-24 05:02:50 +08:00
Enable additional playlist page type
Some user pages have a different playlist format, e.g.: http://www.youtube.com/user/stanforduniversity#g/c/9D558D49CA734A02 Extract playlist id and turn the URL into a format that is already understood.
This commit is contained in:
parent
f74e22ae28
commit
770267dd44
@ -2096,7 +2096,7 @@ class YahooSearchIE(InfoExtractor):
|
|||||||
class YoutubePlaylistIE(InfoExtractor):
|
class YoutubePlaylistIE(InfoExtractor):
|
||||||
"""Information Extractor for YouTube playlists."""
|
"""Information Extractor for YouTube playlists."""
|
||||||
|
|
||||||
_VALID_URL = r'(?:http://)?(?:\w+\.)?youtube.com/(?:(?:view_play_list|my_playlists|artist)\?.*?(p|a)=|user/.*?/user/|p/)([^&]+).*'
|
_VALID_URL = r'(?:http://)?(?:\w+\.)?youtube.com/(?:(?:view_play_list|my_playlists|artist)\?.*?(p|a)=|user/.*?/user/|p/|user/.*g/c/)([^&]+).*'
|
||||||
_TEMPLATE_URL = 'http://www.youtube.com/%s?%s=%s&page=%s&gl=US&hl=en'
|
_TEMPLATE_URL = 'http://www.youtube.com/%s?%s=%s&page=%s&gl=US&hl=en'
|
||||||
_VIDEO_INDICATOR = r'/watch\?v=(.+?)&'
|
_VIDEO_INDICATOR = r'/watch\?v=(.+?)&'
|
||||||
_MORE_PAGES_INDICATOR = r'(?m)>\s*Next\s*</a>'
|
_MORE_PAGES_INDICATOR = r'(?m)>\s*Next\s*</a>'
|
||||||
@ -2130,6 +2130,7 @@ class YoutubePlaylistIE(InfoExtractor):
|
|||||||
if playlist_prefix == 'a':
|
if playlist_prefix == 'a':
|
||||||
playlist_access = 'artist'
|
playlist_access = 'artist'
|
||||||
else:
|
else:
|
||||||
|
playlist_prefix = 'p'
|
||||||
playlist_access = 'view_play_list'
|
playlist_access = 'view_play_list'
|
||||||
playlist_id = mobj.group(2)
|
playlist_id = mobj.group(2)
|
||||||
video_ids = []
|
video_ids = []
|
||||||
|
Loading…
Reference in New Issue
Block a user