fix fillobj

This commit is contained in:
Romain Bignon 2010-11-09 11:58:01 +01:00
commit f41d8c516c
2 changed files with 6 additions and 7 deletions

View file

@ -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}

View file

@ -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