From 74ec4f67cd6df4029d4d0ffb75f6ede3cf7f65c8 Mon Sep 17 00:00:00 2001 From: Maxime Gasselin Date: Mon, 19 Nov 2018 14:43:42 +0100 Subject: [PATCH] [boursorama] Fix differed transfer Boursorama website does not support date and month format like 08 or 02 , but need 8 or 2. --- modules/boursorama/pages.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/boursorama/pages.py b/modules/boursorama/pages.py index 31629879c3..b4d5efbdbb 100644 --- a/modules/boursorama/pages.py +++ b/modules/boursorama/pages.py @@ -953,8 +953,9 @@ def submit_info(self, amount, label, exec_date): else: assert self.get_option(form.el.xpath('//select[@id="Characteristics_schedulingType"]')[0], 'Différé') == '2' form['Characteristics[schedulingType]'] = '2' - form['Characteristics[scheduledDate][day]'] = exec_date.strftime('%d') - form['Characteristics[scheduledDate][month]'] = exec_date.strftime('%m') + # If we let the 0 in the front of the month or the day like 02, the website will not interpret the good date + form['Characteristics[scheduledDate][day]'] = exec_date.strftime('%d').lstrip("0") + form['Characteristics[scheduledDate][month]'] = exec_date.strftime('%m').lstrip("0") form['Characteristics[scheduledDate][year]'] = exec_date.strftime('%Y') form['Characteristics[notice]'] = 'none' -- GitLab