]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[youtube:toplist] Make the regex for finding the playlist link more flexible
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 25 Jan 2014 14:47:03 +0000 (15:47 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 25 Jan 2014 14:47:03 +0000 (15:47 +0100)
`title={foo}` may not be at the end of the `href` string.

youtube_dl/extractor/youtube.py

index 1bc2dc22b48f9e68a7c3d092708caceefd7e7c62..1c74e3fc9d6be01125ef6a96f2edc240bf2ab550 100644 (file)
@@ -1529,7 +1529,7 @@ class YoutubeTopListIE(YoutubePlaylistIE):
         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)