From c33835d941126df6a47764f870661395466764a6 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 19 Dec 2019 20:36:37 +0100 Subject: [PATCH] [creditmutuel] remove supplementary date in raw labels The bank's website has added a new ".eir_showxs" class to display elements only on mobile devices, only containing the transaction's date (without the "Date de valeur" prefix). Remove it if we see it in the list of text elements in the raw label. --- modules/creditmutuel/pages.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/creditmutuel/pages.py b/modules/creditmutuel/pages.py index 02938e5199..d609a95fa2 100644 --- a/modules/creditmutuel/pages.py +++ b/modules/creditmutuel/pages.py @@ -794,6 +794,13 @@ class OwnRaw(Filter): def __call__(self, item): el = TableCell('raw')(item)[0] + # All the sub-elements with the class "eir_showxs" are to + # be shown only in mobile screens, and are hidden via + # display:none on desktop. + # Clear their content in place. + for elem in el.xpath(".//node()[contains(@class, \"eir_showxs\")]"): + elem.drop_tree() + # Remove hidden parts of labels: # hideifscript: Date de valeur XX/XX/XXXX # fd: Avis d'opéré -- GitLab