From 521f904778208e276b86c6980dc8d67c26e9525f Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sat, 12 Oct 2024 19:10:08 +0200 Subject: [PATCH] Facilitateurs dans la classe --- src/agenda_culturel/import_tasks/extractor.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/agenda_culturel/import_tasks/extractor.py b/src/agenda_culturel/import_tasks/extractor.py index 76135d9..175be00 100644 --- a/src/agenda_culturel/import_tasks/extractor.py +++ b/src/agenda_culturel/import_tasks/extractor.py @@ -4,9 +4,6 @@ import re import unicodedata -def remove_accents(input_str): - nfkd_form = unicodedata.normalize("NFKD", input_str) - return "".join([c for c in nfkd_form if not unicodedata.combining(c)]) class Extractor(ABC): @@ -18,6 +15,10 @@ class Extractor(ABC): self.downloader = None self.referer = "" + def remove_accents(input_str): + nfkd_form = unicodedata.normalize("NFKD", input_str) + return "".join([c for c in nfkd_form if not unicodedata.combining(c)]) + def guess_end_day(start_day, start_time, end_time): if end_time: if end_time > start_time: