change AccountsPage xpath to only get personal finances accounts

This commit is contained in:
Baptiste Delpey 2015-02-02 14:34:07 +01:00 committed by Romain Bignon
commit aa60f96eae

View file

@ -45,7 +45,7 @@ class AccountsPage(HTMLPage):
account_type = Account.TYPE_UNKNOWN
accounts = []
for tr in self.doc.xpath('//table[@class="ecli"]/tr'):
for tr in self.doc.xpath('//div[@class="finance"]/form/table[@class="ecli"]/tr'):
if tr.attrib.get('class', '') == 'entete':
account_type = self.ACCOUNT_TYPES.get(tr.find('th').text.strip(), Account.TYPE_UNKNOWN)
continue