Use @pagination

This commit is contained in:
Florent 2014-04-15 10:32:37 +02:00
commit 21fe640453
2 changed files with 3 additions and 2 deletions

View file

@ -51,4 +51,4 @@ class PoivyBrowser(LoginBrowser):
@need_login
def get_history(self):
self.history.stay_or_go()
return self.pagination(lambda: self.page.get_calls())
return self.page.get_calls()

View file

@ -18,7 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser import BrowserBanned
from weboob.tools.browser2.page import HTMLPage, LoggedPage, method, ListElement, ItemElement
from weboob.tools.browser2.page import HTMLPage, LoggedPage, method, ListElement, ItemElement, pagination
from weboob.tools.browser2.filters import CleanText, CleanDecimal, Field, Attr, DateTime, Link, Format
from weboob.capabilities.bill import Subscription, Detail
@ -64,6 +64,7 @@ class HomePage(LoggedPage, HTMLPage):
class HistoryPage(LoggedPage, HTMLPage):
@pagination
@method
class get_calls(ListElement):
item_xpath = '//table/tbody/tr'