Ajout d'informations complémentaires

Cf #216
This commit is contained in:
Jean-Marie Favreau 2024-11-29 11:01:26 +01:00
parent 256fed1e2e
commit 42fb85af48

View File

@ -106,6 +106,15 @@ class CExtractor(TwoStepsExtractor):
description = soup.select("#descspec") description = soup.select("#descspec")
if description and len(description) > 0: if description and len(description) > 0:
description = description[0].get_text().replace("Lire plus...", "") description = description[0].get_text().replace("Lire plus...", "")
# on ajoute éventuellement les informations complémentaires
d_suite = ""
for d in ["typedesc", "dureedesc", "lieuspec"]:
comp_desc = soup.select("#" + d)
if comp_desc and len(comp_desc) > 0:
d_suite += "\n\n" + comp_desc[0].get_text()
if d_suite != "":
description += "\n\n> Informations complémentaires:" + d_suite
else: else:
description = None description = None