new API for the fillobj feature and severaaal fixes

This commit is contained in:
Romain Bignon 2010-07-18 00:35:07 +02:00
commit edc83df3a1
11 changed files with 60 additions and 42 deletions

View file

@ -17,11 +17,9 @@
import datetime
import logging
from weboob.capabilities.video import ICapVideo
from weboob.tools.backend import BaseBackend
from weboob.tools.misc import iter_fields
from .browser import YoutubeBrowser
from .video import YoutubeVideo
@ -67,3 +65,9 @@ class YoutubeBackend(BaseBackend, ICapVideo):
def iter_page_urls(self, mozaic_url):
raise NotImplementedError()
def fill_video(self, video, fields):
# ignore the fields param: VideoPage.get_video() returns all the information
return self.browser.get_video(YoutubeVideo.id2url(video.id), video)
OBJECTS = {YoutubeVideo: fill_video}