Delubac: history: support pagination

This commit is contained in:
Noé Rubinstein 2013-07-22 12:27:55 +02:00 committed by Romain Bignon
commit 3f4a0b85fd
2 changed files with 17 additions and 3 deletions

View file

@ -73,6 +73,7 @@ class DashboardPage(BasePage):
class OperationsPage(BasePage):
_LINE_XPATH = '//tr[starts-with(@class,"PL_LIGLST_")]'
_NEXT_XPATH = '//a[contains(@class,"pg_next")]/@href'
def iter_history(self):
i = 0
@ -92,6 +93,11 @@ class OperationsPage(BasePage):
yield operation
def next_page(self):
next_button = self.document.xpath(self._NEXT_XPATH)
if next_button:
return next_button[0]
class Transaction(FrenchTransaction):
PATTERNS = [(re.compile('^(?:Vir(?:ement)?|VRT) (?P<text>.*)', re.I),