fix changes + clean
This commit is contained in:
parent
96181bad0c
commit
632d52e923
2 changed files with 16 additions and 16 deletions
|
|
@ -33,18 +33,14 @@ class Fortuneo(BaseBrowser):
|
||||||
CERTHASH = 'f71bd27994f395963c4a500d9d330cb50cef37ee5946146f9ca2492c2552b2ba'
|
CERTHASH = 'f71bd27994f395963c4a500d9d330cb50cef37ee5946146f9ca2492c2552b2ba'
|
||||||
ENCODING = None # refer to the HTML encoding
|
ENCODING = None # refer to the HTML encoding
|
||||||
PAGES = {
|
PAGES = {
|
||||||
'.*identification.jsp.*':
|
'.*identification\.jsp.*' : LoginPage,
|
||||||
LoginPage,
|
|
||||||
'.*/prive/mes-comptes/synthese-tous-comptes.jsp':
|
'.*prive/default\.jsp.*' : AccountsList,
|
||||||
AccountsList,
|
'.*/prive/mes-comptes/synthese-mes-comptes\.jsp' : AccountsList,
|
||||||
'.*/prive/mes-comptes/synthese-mes-comptes\.jsp':
|
|
||||||
AccountsList,
|
'.*/prive/mes-comptes/livret/consulter-situation/consulter-solde\.jsp.*' : AccountHistoryPage,
|
||||||
'.*/prive/mes-comptes/livret/consulter-situation/consulter-solde\.jsp\?COMPTE_ACTIF=.*':
|
'.*/prive/mes-comptes/compte-courant/consulter-situation/consulter-solde\.jsp.*' : AccountHistoryPage,
|
||||||
AccountHistoryPage,
|
|
||||||
'.*/prive/mes-comptes/compte-courant/consulter-situation/consulter-solde\.jsp\?COMPTE_ACTIF=.*':
|
|
||||||
AccountHistoryPage,
|
|
||||||
'.*/prive/default\.jsp.*':
|
|
||||||
AccountsList
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
|
||||||
|
|
@ -106,11 +106,15 @@ class AccountsList(BasePage):
|
||||||
#else:
|
#else:
|
||||||
# account.coming = Decimal(mycomingval)
|
# account.coming = Decimal(mycomingval)
|
||||||
|
|
||||||
# account._link_id
|
|
||||||
url_to_parse = cpt.xpath('@href')[0].replace("\n", "") # link
|
url_to_parse = cpt.xpath('@href')[0].replace("\n", "") # link
|
||||||
compte_id_re = re.compile(r'/prive/mes-comptes/([^/]+/).*COMPTE_ACTIF=([^\&]+)\&?')
|
|
||||||
account._link_id = '/fr/prive/mes-comptes/%sconsulter-situation/consulter-solde.jsp?COMPTE_ACTIF=%s' % \
|
# account._link_id = lien vers historique d'un compte (courant of livret)
|
||||||
(compte_id_re.search(url_to_parse).groups()[0], compte_id_re.search(url_to_parse).groups()[1])
|
if '/mes-comptes/livret/' in url_to_parse:
|
||||||
|
compte_id_re = re.compile(r'.*\?(.*)$')
|
||||||
|
account._link_id = '/fr/prive/mes-comptes/livret/consulter-situation/consulter-solde.jsp?%s' % \
|
||||||
|
(compte_id_re.search(url_to_parse).groups()[0])
|
||||||
|
else:
|
||||||
|
account._link_id = url_to_parse
|
||||||
|
|
||||||
# account.label
|
# account.label
|
||||||
temp_label = cpt.xpath('./text()')[1].replace(u'-\xa0', '').replace("\n", "").replace("\t", "")
|
temp_label = cpt.xpath('./text()')[1].replace(u'-\xa0', '').replace("\n", "").replace("\t", "")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue