fix bforbank
This commit is contained in:
parent
acbbb862ab
commit
306d25242d
2 changed files with 3 additions and 3 deletions
|
|
@ -21,7 +21,7 @@
|
||||||
from weboob.tools.backend import Module, BackendConfig
|
from weboob.tools.backend import Module, BackendConfig
|
||||||
from weboob.capabilities.bank import CapBank, AccountNotFound
|
from weboob.capabilities.bank import CapBank, AccountNotFound
|
||||||
from weboob.capabilities.base import find_object
|
from weboob.capabilities.base import find_object
|
||||||
from weboob.tools.value import ValueBackendPassword
|
from weboob.tools.value import ValueBackendPassword, Value
|
||||||
from .browser import BforbankBrowser
|
from .browser import BforbankBrowser
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -37,7 +37,7 @@ class BforbankModule(Module, CapBank):
|
||||||
VERSION = '1.1'
|
VERSION = '1.1'
|
||||||
CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False),
|
CONFIG = BackendConfig(ValueBackendPassword('login', label='Identifiant', masked=False),
|
||||||
ValueBackendPassword('password', label='Code personnel'),
|
ValueBackendPassword('password', label='Code personnel'),
|
||||||
ValueBackendPassword('birthdate', label='Date de naissance'),
|
Value('birthdate', label='Date de naissance', regexp='^(\d{2}[/-]?\d{2}[/-]?\d{4}|)$')
|
||||||
)
|
)
|
||||||
|
|
||||||
BROWSER = BforbankBrowser
|
BROWSER = BforbankBrowser
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ class AccountsPage(LoggedPage, HTMLPage):
|
||||||
balance = re.sub(r'[^\d\-\,]', '', balance)
|
balance = re.sub(r'[^\d\-\,]', '', balance)
|
||||||
return Decimal(re.sub(r',(?!(\d+$))', '', balance).replace(',', '.'))
|
return Decimal(re.sub(r',(?!(\d+$))', '', balance).replace(',', '.'))
|
||||||
|
|
||||||
obj_id = CleanText('./td/div/div[3]/span')
|
obj_id = CleanText('./td/div/div[3]/span') & Regexp(pattern=r'(\d+)')
|
||||||
obj_label = CleanText('./td/div/div[2]/span')
|
obj_label = CleanText('./td/div/div[2]/span')
|
||||||
obj_currency = FrenchTransaction.Currency('./td/div/div[1]/div/span')
|
obj_currency = FrenchTransaction.Currency('./td/div/div[1]/div/span')
|
||||||
obj_type = Map(Regexp(Field('label'), r'^(\w+)'), TYPE, default=Account.TYPE_UNKNOWN)
|
obj_type = Map(Regexp(Field('label'), r'^(\w+)'), TYPE, default=Account.TYPE_UNKNOWN)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue