1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-11-22 18:02:51 +08:00

[dailymotion] Fix user playlist extraction

This commit is contained in:
Sergey M․ 2014-04-23 19:42:34 +07:00
parent 5bec574859
commit 4b10aadffc

View File

@ -11,8 +11,8 @@ from ..utils import (
orderedSet, orderedSet,
str_to_int, str_to_int,
int_or_none, int_or_none,
ExtractorError, ExtractorError,
unescapeHTML,
) )
class DailymotionBaseInfoExtractor(InfoExtractor): class DailymotionBaseInfoExtractor(InfoExtractor):
@ -188,7 +188,7 @@ class DailymotionPlaylistIE(DailymotionBaseInfoExtractor):
webpage = self._download_webpage(request, webpage = self._download_webpage(request,
id, u'Downloading page %s' % pagenum) id, u'Downloading page %s' % pagenum)
video_ids.extend(re.findall(r'data-id="(.+?)"', webpage)) video_ids.extend(re.findall(r'data-xid="(.+?)"', webpage))
if re.search(self._MORE_PAGES_INDICATOR, webpage) is None: if re.search(self._MORE_PAGES_INDICATOR, webpage) is None:
break break
@ -217,9 +217,9 @@ class DailymotionUserIE(DailymotionPlaylistIE):
mobj = re.match(self._VALID_URL, url) mobj = re.match(self._VALID_URL, url)
user = mobj.group('user') user = mobj.group('user')
webpage = self._download_webpage(url, user) webpage = self._download_webpage(url, user)
full_user = self._html_search_regex( full_user = unescapeHTML(self._html_search_regex(
r'<a class="label" href="/%s".*?>(.*?)</' % re.escape(user), r'<a class="nav-image" title="([^"]+)" href="/%s">' % re.escape(user),
webpage, u'user', flags=re.DOTALL) webpage, u'user', flags=re.DOTALL))
return { return {
'_type': 'playlist', '_type': 'playlist',