diff options
author | Sergey M. <dstftw@gmail.com> | 2015-05-31 02:19:00 +0500 |
---|---|---|
committer | Sergey M. <dstftw@gmail.com> | 2015-05-31 02:19:00 +0500 |
commit | 002c0fb511f3908c07833191517802e2c51ac731 (patch) | |
tree | 694db496d91e8cc82294c23f6606943238134142 /youtube_dl | |
parent | 7584e38ce4e98e0e9abca146a513d215701308e2 (diff) | |
parent | d2a9de78dfc629aaaaf8a2a30432d5f02c949e9a (diff) |
Merge pull request #5852 from ivan/make-playlist-url
[youtube] Construct a playlist URL in case the page is missing one
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 8 |
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}&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) |