From f8f8b3ead504c619e0b8bc6e9602d562e5defa53 Mon Sep 17 00:00:00 2001 From: Maxime Pommier Date: Thu, 13 Jun 2019 19:33:18 +0200 Subject: [PATCH] [boursorama] We don't get users custom transactions anymore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Users can split their transactions if they want. We don't want this kind of custom transaction. - The sum of this transactions can be different than the original transaction ex: The real transaction as an amount of 100€, the user is free to split it on 50€ and 60€ - The original transaction is scraped anyway and we don't want duplicates --- modules/boursorama/pages.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/boursorama/pages.py b/modules/boursorama/pages.py index 9fc52a77b9..6bc043b6ab 100644 --- a/modules/boursorama/pages.py +++ b/modules/boursorama/pages.py @@ -529,6 +529,16 @@ def validate(self, obj): return False return True + def condition(self): + # Users can split their transactions if they want. We don't want this kind + # of custom transaction because: + # - The sum of this transactions can be different than the original transaction + # ex: The real transaction as an amount of 100€, the user is free to split it on 50€ and 60€ + # - The original transaction is scraped anyway and we don't want duplicates + if self.xpath('./div[has-class("list__movement__line--block__split")]'): + return False + return True + def get_cards_number_link(self): return Link('//a[small[span[contains(text(), "carte bancaire")]]]', default=NotAvailable)(self.doc) -- GitLab