Commit 659f32e6 authored by mgasselin's avatar mgasselin Committed by Vincent A

[fortuneo] Get TPP id on transfer page

Seems to be for "Comptes tiers" accounts.
parent 55ab039b
......@@ -290,6 +290,9 @@ def iter_accounts(self):
# TPP can match checking accounts with this id
if not account._tpp_id:
yield account
......@@ -733,7 +733,7 @@ def obj__tpp_id(self):
return Attr(
'//input[@name="numeroCompte" and contains(@value, "%s")]/preceding-sibling::input[1]' %,
def is_loading(self):
......@@ -38,6 +38,7 @@
from woob.capabilities.base import NotAvailable
from import parse_qs, urlparse
from import json
from .accounts_list import ActionNeededPage
......@@ -180,6 +181,19 @@ def get_error(self):
class RegisterTransferPage(LoggedPage, HTMLPage):
class fill_tpp_account_id(ItemElement):
def obj__tpp_id(self):
accounts_list = Regexp(
CleanText('//script[contains(text(), "listeComptesADebiter")]'),
r'listeComptesADebiter = (.*}]); var listeComptesACrediter'
accounts_list = json.loads(accounts_list)
for account in accounts_list:
if account['numero'] ==
return account.get('numeroContratTopaze', NotAvailable)
return NotAvailable
class iter_internal_recipients(ListElement):
item_xpath = '//select[@name="compteACrediter"]/option[not(@selected)]'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment