diff --git a/AUTHORS b/AUTHORS index 5d8fcbf257a0c387f721d880f707a83b48dd1792..cef29c64c47c0bc73564e9fc5c9c2c3517ec14ba 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 6939f74b4bffeedb6726233fe67db559256c0f53..ec3e0abf8c1e6a0ab0f54ba7dd60cf14ce51aa29 100644 --- a/modules/dailymotion/pages.py +++ b/modules/dailymotion/pages.py @@ -88,10 +88,10 @@ def get_video(self, video=None): 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 @@ def get_video(self, video=None): break else: raise BrokenPageError(u'Unable to extract video URL') + video.url = info[max_quality] video.set_empty_fields(NotAvailable)