1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-05 02:32:44 +01:00

[youtube:toplist] Make the regex for finding the playlist link more flexible

`title={foo}` may not be at the end of the `href` string.
This commit is contained in:
Jaime Marquínez Ferrándiz 2014-01-25 15:47:03 +01:00
parent f89197d73e
commit beddbc2ad1

View File

@ -1529,7 +1529,7 @@ def _real_extract(self, url):
channel = mobj.group('chann')
title = mobj.group('title')
query = compat_urllib_parse.urlencode({'title': title})
playlist_re = 'href="([^"]+?%s[^"]+?)"' % re.escape(query)
playlist_re = 'href="([^"]+?%s.*?)"' % re.escape(query)
channel_page = self._download_webpage('https://www.youtube.com/%s' % channel, title)
link = self._html_search_regex(playlist_re, channel_page, u'list')
url = compat_urlparse.urljoin('https://www.youtube.com/', link)