Commit 4f5de64f authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by Vincent A

[boursorama] Fixed bug for loans that has no maturity date

parent 5168c88c
......@@ -426,6 +426,9 @@ class LoanPage(LoggedPage, HTMLPage):
def obj_maturity_date(self):
maturity_date = CleanText('//p[contains(text(), "échéance finale")]/span')(self)
if maturity_date:
# Sometimes there is no maturity date, so instead there is just a dash
if maturity_date == '-':
return NotAvailable
return Date(CleanText('//p[contains(text(), "échéance finale")]/span'), parse_func=parse_french_date)(self)
return Date(Regexp(CleanText('//p[contains(text(), "date de votre dernière échéance")]'), r'(\d.*)'), parse_func=parse_french_date, default=NotAvailable)(self)
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