sgpe: At least have unique ids in a call
This commit is contained in:
parent
34d2ac007b
commit
ab7c812056
2 changed files with 5 additions and 3 deletions
|
|
@ -89,10 +89,12 @@ class SGPEBrowser(BaseBrowser):
|
||||||
|
|
||||||
def iter_history(self, account):
|
def iter_history(self, account):
|
||||||
page = 1
|
page = 1
|
||||||
|
basecount = 0
|
||||||
while page:
|
while page:
|
||||||
self.history(account.id, page)
|
self.history(account.id, page)
|
||||||
assert self.is_on_page(HistoryPage)
|
assert self.is_on_page(HistoryPage)
|
||||||
for transaction in self.page.iter_transactions(account):
|
for transaction in self.page.iter_transactions(account, basecount):
|
||||||
|
basecount = transaction.id + 1
|
||||||
yield transaction
|
yield transaction
|
||||||
if self.page.has_next():
|
if self.page.has_next():
|
||||||
page += 1
|
page += 1
|
||||||
|
|
|
||||||
|
|
@ -113,9 +113,9 @@ class AccountsPage(SGPEPage):
|
||||||
|
|
||||||
|
|
||||||
class HistoryPage(SGPEPage):
|
class HistoryPage(SGPEPage):
|
||||||
def iter_transactions(self, account):
|
def iter_transactions(self, account, basecount):
|
||||||
table = self.parser.select(self.document.getroot(), '#tab-corps', 1)
|
table = self.parser.select(self.document.getroot(), '#tab-corps', 1)
|
||||||
for i, tr in enumerate(self.parser.select(table, 'tr', 'many')):
|
for i, tr in enumerate(self.parser.select(table, 'tr', 'many'), basecount):
|
||||||
# td colspan=5
|
# td colspan=5
|
||||||
if len(self.parser.select(tr, 'td')) == 1:
|
if len(self.parser.select(tr, 'td')) == 1:
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue