aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorIvan Kozik <ivan@ludios.org>2015-05-30 20:50:22 +0000
committerIvan Kozik <ivan@ludios.org>2015-05-30 20:54:03 +0000
commitd2a9de78dfc629aaaaf8a2a30432d5f02c949e9a (patch)
tree04d9c27370f41ca0207c39f99c984d889746ad12 /youtube_dl/extractor/youtube.py
parentc5138a7ce49db19b64adc11d81384595b966a7a9 (diff)
[youtube] Construct a playlist URL in case the page is missing one
This fixes jumping from user/channel -> playlist for some users like https://www.youtube.com/user/BitcoinFoundation This also removes the superfluous log message "add --no-playlist to just download video VIDEOID" when downloading a user/channel.
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index fcdbfe0bc..aacb999ce 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1412,12 +1412,8 @@ class YoutubeChannelIE(InfoExtractor):
channel_page, 'channel id', default=None)
if channel_playlist_id and channel_playlist_id.startswith('UC'):
playlist_id = 'UU' + channel_playlist_id[2:]
- channel_playlist = unescapeHTML(self._search_regex(
- r'href="/?(watch\?v=[0-9A-Za-z_-]{11}&amp;list=%s)"' % playlist_id,
- channel_page, 'channel playlist URL', default=None))
- if channel_playlist:
- return self.url_result(
- compat_urlparse.urljoin(url, '/%s' % channel_playlist), 'YoutubePlaylist')
+ return self.url_result(
+ compat_urlparse.urljoin(url, '/playlist?list=%s' % playlist_id), 'YoutubePlaylist')
channel_page = self._download_webpage(url, channel_id, 'Downloading page #1')
autogenerated = re.search(r'''(?x)