diff --git a/modules/boursorama/pages.py b/modules/boursorama/pages.py index 0a2e0507fa027d650a7892b4967e64d825b26266..e32e0ff8d14a17235e7a3f08d583b23386ed4a81 100644 --- a/modules/boursorama/pages.py +++ b/modules/boursorama/pages.py @@ -426,6 +426,9 @@ def obj_total_amount(self): 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)