move select() in parser

This commit is contained in:
Romain Bignon 2011-04-08 19:39:57 +02:00
commit 9afb301ebe
30 changed files with 197 additions and 197 deletions

View file

@ -19,7 +19,7 @@
from weboob.tools.browser import BasePage
from weboob.tools.parsers.lxmlparser import select
__all__ = ['ForbiddenVideo', 'ForbiddenVideoPage', 'VerifyAgePage', 'VideoPage']
@ -31,7 +31,7 @@ class ForbiddenVideo(Exception):
class ForbiddenVideoPage(BasePage):
def get_video(self, video=None):
element = select(self.document.getroot(), '.yt-alert-content', 1)
element = self.parser.select(self.document.getroot(), '.yt-alert-content', 1)
raise ForbiddenVideo(element.text.strip())