diff --git a/weboob/backends/youjizz/pages/index.py b/weboob/backends/youjizz/pages/index.py index 80203e6e..250953a3 100644 --- a/weboob/backends/youjizz/pages/index.py +++ b/weboob/backends/youjizz/pages/index.py @@ -42,7 +42,7 @@ class IndexPage(BasePage): url = a.attrib['href'] _id = re.sub(r'/videos/(.+)\.html', r'\1', url) - preview_url = span.find('.//img').attrib['src'] + thumbnail_url = span.find('.//img').attrib['src'] title1 = span.cssselect('span#title1') if title1 is None: @@ -60,6 +60,6 @@ class IndexPage(BasePage): yield Video(_id, title=title, duration=duration, - preview_url=preview_url, + thumbnail_url=thumbnail_url, nsfw=True, id2url=tools.id2url) diff --git a/weboob/backends/youporn/pages/index.py b/weboob/backends/youporn/pages/index.py index 39bd25a9..e92bf31f 100644 --- a/weboob/backends/youporn/pages/index.py +++ b/weboob/backends/youporn/pages/index.py @@ -39,7 +39,7 @@ class IndexPage(PornPage): if a is None or a.find('img') is None: continue - preview_url = a.find('img').attrib['src'] + thumbnail_url = a.find('img').attrib['src'] h1 = li.find('h1') a = h1.find('a') @@ -71,6 +71,6 @@ class IndexPage(PornPage): rating=rating, rating_max=rating_max, duration=duration, - preview_url=preview_url, + thumbnail_url=thumbnail_url, nsfw=True, id2url=tools.id2url) diff --git a/weboob/backends/youtube/backend.py b/weboob/backends/youtube/backend.py index 9b05532b..7ac09487 100644 --- a/weboob/backends/youtube/backend.py +++ b/weboob/backends/youtube/backend.py @@ -78,7 +78,7 @@ class YoutubeBackend(BaseBackend, ICapVideoProvider): title=entry.media.title.text.decode('utf-8').strip(), author=author, duration=int(entry.media.duration.seconds.decode('utf-8').strip()), - preview_url=entry.media.thumbnail[0].url.decode('utf-8').strip(), + thumbnail_url=entry.media.thumbnail[0].url.decode('utf-8').strip(), id2url=tools.id2url) def iter_page_urls(self, mozaic_url): diff --git a/weboob/capabilities/video.py b/weboob/capabilities/video.py index 51d3e0cf..be0536d9 100644 --- a/weboob/capabilities/video.py +++ b/weboob/capabilities/video.py @@ -26,7 +26,7 @@ __all__ = ['ICapVideoProvider', 'Video'] class Video(object): def __init__(self, _id, title=None, url=None, author=None, duration=0, date=None, - rating=0.0, rating_max=0.0, preview_url=None, nsfw=False, id2url=None): + rating=0.0, rating_max=0.0, thumbnail_url=None, nsfw=False, id2url=None): self.id = _id self.title = title self.url = url @@ -35,7 +35,7 @@ class Video(object): self.date = date self.rating = float(rating) self.rating_max = float(rating_max) - self.preview_url = preview_url + self.thumbnail_url = thumbnail_url self.nsfw = nsfw self.id2url = id2url diff --git a/weboob/frontends/qvideoob/minivideo.py b/weboob/frontends/qvideoob/minivideo.py index 870e2e9f..23b9c77b 100644 --- a/weboob/frontends/qvideoob/minivideo.py +++ b/weboob/frontends/qvideoob/minivideo.py @@ -42,8 +42,8 @@ class MiniVideo(QFrame): else: self.ui.ratingLabel.setText('%s' % video.rating) - if video.preview_url: - data = urllib2.urlopen(video.preview_url).read() + if video.thumbnail_url: + data = urllib2.urlopen(video.thumbnail_url).read() img = QImage.fromData(data) self.ui.imageLabel.setPixmap(QPixmap.fromImage(img))