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

@ -16,8 +16,6 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import logging
from weboob.tools.browser import BaseBrowser
from weboob.tools.browser.decorators import id2url
@ -36,12 +34,7 @@ class YoutubeBrowser(BaseBrowser):
r'.*youtube\.com/verify_age\?next_url=(?P<next_url>.+)': VerifyAgePage,
}
def fillobj(self, video, fields):
# ignore the fields param: VideoPage.get_video() returns all the information
self.location(YoutubeVideo.id2url(video.id))
return self.page.get_video(video)
@id2url(YoutubeVideo.id2url)
def get_video(self, url):
def get_video(self, url, video=None):
self.location(url)
return self.page.get_video()
return self.page.get_video(video)