diff --git a/AUTHORS b/AUTHORS index 5d8fcbf2..cef29c64 100644 --- a/AUTHORS +++ b/AUTHORS @@ -131,7 +131,7 @@ Jean-Philippe Dutrève * Fixes on bank modules. Vincent Texier - * Fixes on YouJizz. + * Fixes on YouJizz and Dailymotion. Mathieu Lordon * Fixes on bank modules. diff --git a/modules/dailymotion/pages.py b/modules/dailymotion/pages.py index 6939f74b..ec3e0abf 100644 --- a/modules/dailymotion/pages.py +++ b/modules/dailymotion/pages.py @@ -88,10 +88,10 @@ class VideoPage(BasePage): div = self.parser.select(self.document.getroot(), 'div#content', 1) - video.title = unicode(self.parser.select(div, 'span.title', 1).text).strip() - video.author = unicode(self.parser.select(div, 'a.name, span.name, a[rel=author]', 1).text).strip() + video.title = unicode(self.parser.select(div, 'div, meta[itemprop=name]', 1).get("content")).strip() + video.author = unicode(self.parser.select(div, 'div, meta[itemprop=author]', 1).get("content")).strip() try: - video.description = html2text(self.parser.tostring(self.parser.select(div, 'div#video_description', 1))).strip() or unicode() + video.description = html2text(self.parser.tostring(self.parser.select(div, 'div, meta[itemprop=description]', 1))).strip() or unicode() except BrokenPageError: video.description = u'' @@ -110,6 +110,7 @@ class VideoPage(BasePage): break else: raise BrokenPageError(u'Unable to extract video URL') + video.url = info[max_quality] video.set_empty_fields(NotAvailable)