Commit 4f36b965 authored by Martin Sicot's avatar Martin Sicot Committed by Romain Bignon

[boursorama] Correct date format for loans and xpath

Use parse_french_date instead of Date to get the different dates for the
loans.
parent 8edaa538
......@@ -349,13 +349,13 @@ class LoanPage(LoggedPage, HTMLPage):
obj_total_amount = CleanDecimal('//p[contains(text(), "Montant emprunt")]/span', replace_dots=True)
obj_currency = CleanCurrency('//p[contains(text(), "Montant emprunt")]/span')
obj_duration = CleanDecimal('//p[contains(text(), "Nombre prévisionnel d\'échéances restantes")]/span')
obj_subscription_date = Date(CleanText('//p[contains(text(), "Date de départ du prêt")]/span'))
obj_maturity_date = Date(CleanText('//p[contains(text(), "Date prévisionnelle d\'échéance finale")]/span'))
obj_rate = CleanDecimal('//p[contains(text(), "Taux nominal en vigueur du prêt")]/span')
obj_nb_payments_left = CleanDecimal('//p[contains(text(), "Nombre prévisionnel d\'échéances restantes")]/span')
obj_nb_payments_total = CleanDecimal('//p[contains(text(), "Nombre d\'écheances totales")]/span')
obj_next_payment_amount = CleanDecimal('//p[contains(text(), "Montant de la prochaine échéance")]/span', replace_dots=True)
obj_next_payment_date = Date(CleanText('//p[contains(text(), "Date de la prochaine échéance")]/span'))
obj_nb_payments_total = CleanDecimal('//p[contains(text(), "Nombre d\'écheances totales") or contains(text(), "Nombre total d\'échéances")]/span')
obj_next_payment_date = Date(CleanText('//p[contains(text(), "Date de la prochaine échéance")]/span'), parse_func=parse_french_date)
obj_subscription_date = Date(CleanText('//p[contains(text(), "Date de départ du prêt")]/span'), parse_func=parse_french_date)
obj_maturity_date = Date(CleanText('//p[contains(text(), "Date prévisionnelle d\'échéance finale")]/span'), parse_func=parse_french_date)
def obj_balance(self):
balance = CleanDecimal('//p[contains(text(), "Capital restant dû")]/span', replace_dots=True)(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