fix fillobj() on videos without thumbnails
This commit is contained in:
parent
923c2ffc84
commit
203d540163
7 changed files with 8 additions and 8 deletions
|
|
@ -59,7 +59,7 @@ class ArteBackend(BaseBackend, ICapVideo):
|
||||||
# if we don't want only the thumbnail, we probably want also every fields
|
# if we don't want only the thumbnail, we probably want also every fields
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video = self.browser.get_video(ArteVideo.id2url(video.id), video)
|
video = self.browser.get_video(ArteVideo.id2url(video.id), video)
|
||||||
if 'thumbnail' in fields:
|
if 'thumbnail' in fields and video.thumbnail:
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ class CanalplusBackend(BaseBackend, ICapVideo, ICapCollection):
|
||||||
# if we don't want only the thumbnail, we probably want also every fields
|
# if we don't want only the thumbnail, we probably want also every fields
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video = self.browser.get_video(CanalplusVideo.id2url(video.id), video)
|
video = self.browser.get_video(CanalplusVideo.id2url(video.id), video)
|
||||||
if 'thumbnail' in fields:
|
if 'thumbnail' in fields and video.thumbnail:
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
||||||
return video
|
return video
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class DailymotionBackend(BaseBackend, ICapVideo):
|
||||||
# if we don't want only the thumbnail, we probably want also every fields
|
# if we don't want only the thumbnail, we probably want also every fields
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video = self.browser.get_video(DailymotionVideo.id2url(video.id), video)
|
video = self.browser.get_video(DailymotionVideo.id2url(video.id), video)
|
||||||
if 'thumbnail' in fields:
|
if 'thumbnail' in fields and video.thumbnail:
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class InaBackend(BaseBackend, ICapVideo):
|
||||||
# if we don't want only the thumbnail, we probably want also every fields
|
# if we don't want only the thumbnail, we probably want also every fields
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video = self.browser.get_video(video.id, video)
|
video = self.browser.get_video(video.id, video)
|
||||||
if 'thumbnail' in fields:
|
if 'thumbnail' in fields and video.thumbnail:
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ class KickassBrowser(BaseBrowser):
|
||||||
ENCODING = 'utf-8'
|
ENCODING = 'utf-8'
|
||||||
USER_AGENT = BaseBrowser.USER_AGENTS['wget']
|
USER_AGENT = BaseBrowser.USER_AGENTS['wget']
|
||||||
PAGES = {
|
PAGES = {
|
||||||
'http://fr.kickasstorrents.com/new/.*field=seeders&sorder=desc': TorrentsPage,
|
'http://fr.(kickasstorrents.com|kat.ph)/new/.*field=seeders&sorder=desc': TorrentsPage,
|
||||||
'http://fr.kickasstorrents.com/.*.html': TorrentPage,
|
'http://fr.(kickasstorrents.com|kat.ph)/.*.html': TorrentPage,
|
||||||
}
|
}
|
||||||
|
|
||||||
def home(self):
|
def home(self):
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class YoujizzBackend(BaseBackend, ICapVideo):
|
||||||
# if we don't want only the thumbnail, we probably want also every fields
|
# if we don't want only the thumbnail, we probably want also every fields
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video = self.browser.get_video(YoujizzVideo.id2url(video.id), video)
|
video = self.browser.get_video(YoujizzVideo.id2url(video.id), video)
|
||||||
if 'thumbnail' in fields:
|
if 'thumbnail' in fields and video.thumbnail:
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class YoupornBackend(BaseBackend, ICapVideo):
|
||||||
# if we don't want only the thumbnail, we probably want also every fields
|
# if we don't want only the thumbnail, we probably want also every fields
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video = self.browser.get_video(YoupornVideo.id2url(video.id), video)
|
video = self.browser.get_video(YoupornVideo.id2url(video.id), video)
|
||||||
if 'thumbnail' in fields:
|
if 'thumbnail' in fields and video.thumbnail:
|
||||||
with self.browser:
|
with self.browser:
|
||||||
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
video.thumbnail.data = self.browser.readurl(video.thumbnail.url)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue