cleaner way to iterate
This commit is contained in:
parent
ad31e68143
commit
56e9d53adb
1 changed files with 56 additions and 56 deletions
|
|
@ -31,8 +31,8 @@ class AccountsList(Page):
|
|||
pass
|
||||
|
||||
def get_list(self):
|
||||
for div in self.document.getiterator('div'):
|
||||
if div.attrib.get('id', '') == 'synthese-list':
|
||||
blocks = self.document.xpath('//div[@id="synthese-list"]//div[@class="block"]')
|
||||
for div in blocks:
|
||||
for tr in div.getiterator('tr'):
|
||||
account = Account()
|
||||
account.id = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue