fix fillobj
This commit is contained in:
parent
78960f2dd3
commit
f41d8c516c
2 changed files with 6 additions and 7 deletions
|
|
@ -44,12 +44,13 @@ class CanalplusBackend(BaseBackend, ICapVideo):
|
|||
def iter_search_results(self, pattern=None, sortby=ICapVideo.SEARCH_RELEVANCE, nsfw=False, max_results=None):
|
||||
with self.browser:
|
||||
return self.browser.iter_search_results(pattern)
|
||||
|
||||
|
||||
def get_video(self, _id):
|
||||
with self.browser:
|
||||
return self.browser.get_video(_id)
|
||||
|
||||
|
||||
def fill_video(self, video, fields):
|
||||
return self.browser.get_video(CanalplusVideo.id2url(video.id))
|
||||
|
||||
with self.browser:
|
||||
return self.browser.get_video(CanalplusVideo.id2url(video.id), video)
|
||||
|
||||
OBJECTS = {CanalplusVideo: fill_video}
|
||||
|
|
|
|||
|
|
@ -22,12 +22,10 @@ __all__ = ['VideoPage']
|
|||
class VideoPage(BasePage):
|
||||
def on_loaded(self):
|
||||
pass
|
||||
|
||||
|
||||
def get_video(self, video, quality):
|
||||
if not video:
|
||||
video = CanalplusVideo(self.group_dict['id'])
|
||||
print quality
|
||||
print video.id
|
||||
for vid in self.document.getchildren():
|
||||
url = None
|
||||
lastest = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue