Better choice of url to get history

Work now with livret A accounts
This commit is contained in:
Florent 2013-01-24 21:20:54 +01:00
commit b671819d91
2 changed files with 10 additions and 4 deletions

View file

@ -35,9 +35,9 @@ class Boursorama(BaseBrowser):
CERTHASH = '74429081f489cb723a82171a94350913d42727053fc86cf5bf5c3d65d39ec449'
ENCODING = None # refer to the HTML encoding
PAGES = {
'.*connexion.phtml.*': LoginPage,
'.*/comptes/synthese.phtml': AccountsList,
'.*/comptes/banque/detail/mouvements.phtml.*': AccountHistory,
'.*connexion.phtml.*': LoginPage,
'.*/comptes/synthese.phtml': AccountsList,
'.*/mouvements.phtml.*': AccountHistory,
}
def __init__(self, *args, **kwargs):

View file

@ -44,7 +44,13 @@ class AccountsList(BasePage):
elif td.attrib.get('class', '') == 'account-name':
a = td.find('a')
account.label = to_unicode(a.text)
account._link_id = a.get('href', '')
elif td.attrib.get('class', '') == 'account-more-actions':
for a in td.getiterator('a'):
# For normal account, two "account-more-actions"
# One for the account, one for the credit card. Take the good one
if "mouvements.phtml" in a.attrib['href'] and "/cartes/" not in a.attrib['href']:
account._link_id = a.attrib['href']
elif td.attrib.get('class', '') == 'account-number':
id = td.text