diff --git a/modules/boursorama/browser.py b/modules/boursorama/browser.py index d269e771..3f09fd8d 100644 --- a/modules/boursorama/browser.py +++ b/modules/boursorama/browser.py @@ -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): diff --git a/modules/boursorama/pages/accounts_list.py b/modules/boursorama/pages/accounts_list.py index 7dc4956e..adba50f5 100644 --- a/modules/boursorama/pages/accounts_list.py +++ b/modules/boursorama/pages/accounts_list.py @@ -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