diff --git a/modules/dailymotion/pages.py b/modules/dailymotion/pages.py index 57195d11..dd56103f 100644 --- a/modules/dailymotion/pages.py +++ b/modules/dailymotion/pages.py @@ -17,8 +17,8 @@ # You should have received a copy of the GNU Affero General Public License # along with weboob. If not, see . +from weboob.tools.json import json import datetime -import urllib import re from weboob.tools.capabilities.thumbnail import Thumbnail @@ -70,10 +70,6 @@ class IndexPage(BasePage): url = url.replace('jpeg_preview_medium.jpg', 'jpeg_preview_large.jpg') video.thumbnail = Thumbnail(unicode(url)) - rating_div = self.parser.select(div, 'div.small_stars', 1) - video.rating_max = self.get_rate(rating_div) - video.rating = self.get_rate(rating_div.find('div')) - video.set_empty_fields(NotAvailable, ('url',)) yield video @@ -99,24 +95,23 @@ class VideoPage(BasePage): video.description = html2text(self.parser.tostring(self.parser.select(div, 'div#video_description', 1))).strip() or unicode() except BrokenPageError: video.description = u'' - for script in self.parser.select(self.document.getroot(), 'div.dmco_html'): - # TODO support videos from anyclip, cf http://www.dailymotion.com/video/xkyjiv for example - if 'id' in script.attrib and script.attrib['id'].startswith('container_player_') and \ - script.find('script') is not None: - text = script.find('script').text - mobj = re.search(r'