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
|
pass
|
||||||
|
|
||||||
def get_list(self):
|
def get_list(self):
|
||||||
for div in self.document.getiterator('div'):
|
blocks = self.document.xpath('//div[@id="synthese-list"]//div[@class="block"]')
|
||||||
if div.attrib.get('id', '') == 'synthese-list':
|
for div in blocks:
|
||||||
for tr in div.getiterator('tr'):
|
for tr in div.getiterator('tr'):
|
||||||
account = Account()
|
account = Account()
|
||||||
account.id = None
|
account.id = None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue