From 336787605372471e47a5f285b37049082abfe806 Mon Sep 17 00:00:00 2001 From: pivo Date: Fri, 27 Dec 2024 13:27:48 +0100 Subject: [PATCH 1/2] Actualiser src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ajout de types de compléments à importer --- src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py b/src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py index 5bc6312..4bd5a11 100644 --- a/src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py +++ b/src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py @@ -109,7 +109,7 @@ class CExtractor(TwoStepsExtractor): # on ajoute éventuellement les informations complémentaires d_suite = "" - for d in ["typedesc", "dureedesc", "lieuspec"]: + for d in ["typedesc", "dureedesc", "lieuspec","dureespec","typespec","uncontdroite","datespec"]: comp_desc = soup.select("#" + d) if comp_desc and len(comp_desc) > 0: d_suite += "\n\n" + comp_desc[0].get_text() -- 2.39.5 From 49c7bd5300fe325e6d504f0f60c6308695a2bf1e Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Fri, 27 Dec 2024 16:03:22 +0100 Subject: [PATCH 2/2] =?UTF-8?q?On=20utilise=20les=20classes=20l=C3=A0=20o?= =?UTF-8?q?=C3=B9=20les=20ids=20sont=20multiples=20(html=20pas=20valide)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../import_tasks/custom_extractors/lacomedie.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py b/src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py index 4bd5a11..c82ec1c 100644 --- a/src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py +++ b/src/agenda_culturel/import_tasks/custom_extractors/lacomedie.py @@ -109,10 +109,11 @@ class CExtractor(TwoStepsExtractor): # on ajoute éventuellement les informations complémentaires d_suite = "" - for d in ["typedesc", "dureedesc", "lieuspec","dureespec","typespec","uncontdroite","datespec"]: - comp_desc = soup.select("#" + d) + for d in ["#typespec", "#dureespec", "#lieuspec", ".lkuncontdroitespec"]: + comp_desc = soup.select(d) if comp_desc and len(comp_desc) > 0: - d_suite += "\n\n" + comp_desc[0].get_text() + for desc in comp_desc: + d_suite += "\n\n" + desc.get_text() if d_suite != "": description += "\n\n> Informations complémentaires:" + d_suite else: -- 2.39.5