Les catégories d'import ont l'utf8 à tous les étages

This commit is contained in:
Jean-Marie Favreau 2024-11-21 00:29:51 +01:00
parent d39ea43efb
commit c5c68bcfef
6 changed files with 11 additions and 11 deletions

View File

@ -70,17 +70,17 @@ class CExtractor(TwoStepsExtractorNoPause):
tags = []
if first_cat in ["grand spectacle"]:
category = "Spectacles"
tags.append("danse")
tags.append("💃 danse")
elif first_cat in ["theatre", "humour / one man show"]:
category = "Spectacles"
tags.append("théâtre")
tags.append("🎭 théâtre")
elif first_cat in ["chanson francaise", "musique du monde", "pop / rock", "rap", "rnb", "raggae", "variete"]:
category = "Fêtes & Concerts"
tags.append("concert")
tags.append("🎵 concert")
elif first_cat in ["comedie musicale", "humour / one man show", "spectacle equestre"]:
category = "Spectacles"
elif first_cat in ["spectacle pour enfant"]:
tags = ["jeune public"]
tags = ["🎈 jeune public"]
category = None
else:
category = None

View File

@ -11,7 +11,7 @@ class CExtractor(TwoStepsExtractor):
if not category:
return None
mapping = {"Théâtre": "Spectacles", "Concert": "Fêtes & Concerts", "Projection": "Cinéma"}
mapping_tag = {"Théâtre": "théâtre", "Concert": "concert", "Projection": None}
mapping_tag = {"Théâtre": "🎭 théâtre", "Concert": "🎵 concert", "Projection": None}
if category in mapping:
return mapping[category], mapping_tag[category]
else:

View File

@ -18,8 +18,8 @@ class CExtractor(TwoStepsExtractor):
"PopCorn Live": "Sans catégorie",
}
mapping_tag = {
"Théâtre": "théâtre",
"Danse": "danse",
"Théâtre": "🎭 théâtre",
"Danse": "💃 danse",
"Rencontre": None,
"Sortie de résidence": "sortie de résidence",
"PopCorn Live": None,

View File

@ -22,7 +22,7 @@ class CExtractor(TwoStepsExtractor):
for e in data["events"]:
self.add_event_url(e["url"])
if e["tag"] == "Gratuit":
self.add_event_tag(e["url"], "gratuit")
self.add_event_tag(e["url"], "💶 gratuit")
else:
raise Exception("Cannot extract events from javascript")
@ -53,7 +53,7 @@ class CExtractor(TwoStepsExtractor):
if description is None:
description = ""
tags = ["concert"]
tags = ["🎵 concert"]
link_calendar = soup.select('a[href^="https://calendar.google.com/calendar/"]')
if len(link_calendar) == 0:

View File

@ -58,7 +58,7 @@ class CExtractor(TwoStepsExtractor):
end_day = Extractor.guess_end_day(start_day, start_time, end_time)
url_human = event_url
tags = ["concert"]
tags = ["🎵 concert"]
image = soup.select("wow-image img[fetchpriority=high]")
if image:

View File

@ -10,7 +10,7 @@ class CExtractor(TwoStepsExtractor):
if not category:
return None
mapping = {"Concerts": "Fêtes & Concerts"}
mapping_tag = {"Concerts": "concert"}
mapping_tag = {"Concerts": "🎵 concert"}
if category in mapping:
return mapping[category], mapping_tag[category]
else: