Commit 64e92504 authored by Florent Viard's avatar Florent Viard Committed by Vincent A

[boursorama] Fixes iter_recipients for recipients having a "-" in their labels

parent 3091a832
......@@ -1333,15 +1333,22 @@ class NewTransferWizard(LoggedPage, HTMLPage):
klass = Recipient
obj_id = CleanText(
'.//span[contains(@class, "sub-label")]/span[not(contains(@class,"sub-label"))]',
'.//span[contains(@class, "account-sub-label")]/span[not(contains(@class,"account-before-sub-label"))]',
replace=[(' ', '')],
)
obj_label = CleanText(Regexp(
CleanText('.//span[contains(@class, "account-label")]'),
r'([^-]+)',
'\\1',
))
# bank name finish with the following text " •"
obj_bank_name = CleanText('.//span[contains(@class, "account-before-sub-label")]', symbols=['•'])
def obj_label(self):
bank_name = Field('bank_name')(self)
label = CleanText('.//span[contains(@class, "account-label")]')(self)
# Sometimes, Boursorama appends the bank name at the end of the label
if not empty(bank_name):
label = label.replace('- %s' % bank_name, '').strip()
return label
def obj_category(self):
text = CleanText(
......
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