Les catégories d'import ont l'utf8 à tous les étages
This commit is contained in:
parent
d39ea43efb
commit
c5c68bcfef
@ -70,17 +70,17 @@ class CExtractor(TwoStepsExtractorNoPause):
|
|||||||
tags = []
|
tags = []
|
||||||
if first_cat in ["grand spectacle"]:
|
if first_cat in ["grand spectacle"]:
|
||||||
category = "Spectacles"
|
category = "Spectacles"
|
||||||
tags.append("danse")
|
tags.append("💃 danse")
|
||||||
elif first_cat in ["theatre", "humour / one man show"]:
|
elif first_cat in ["theatre", "humour / one man show"]:
|
||||||
category = "Spectacles"
|
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"]:
|
elif first_cat in ["chanson francaise", "musique du monde", "pop / rock", "rap", "rnb", "raggae", "variete"]:
|
||||||
category = "Fêtes & Concerts"
|
category = "Fêtes & Concerts"
|
||||||
tags.append("concert")
|
tags.append("🎵 concert")
|
||||||
elif first_cat in ["comedie musicale", "humour / one man show", "spectacle equestre"]:
|
elif first_cat in ["comedie musicale", "humour / one man show", "spectacle equestre"]:
|
||||||
category = "Spectacles"
|
category = "Spectacles"
|
||||||
elif first_cat in ["spectacle pour enfant"]:
|
elif first_cat in ["spectacle pour enfant"]:
|
||||||
tags = ["jeune public"]
|
tags = ["🎈 jeune public"]
|
||||||
category = None
|
category = None
|
||||||
else:
|
else:
|
||||||
category = None
|
category = None
|
||||||
|
@ -11,7 +11,7 @@ class CExtractor(TwoStepsExtractor):
|
|||||||
if not category:
|
if not category:
|
||||||
return None
|
return None
|
||||||
mapping = {"Théâtre": "Spectacles", "Concert": "Fêtes & Concerts", "Projection": "Cinéma"}
|
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:
|
if category in mapping:
|
||||||
return mapping[category], mapping_tag[category]
|
return mapping[category], mapping_tag[category]
|
||||||
else:
|
else:
|
||||||
|
@ -18,8 +18,8 @@ class CExtractor(TwoStepsExtractor):
|
|||||||
"PopCorn Live": "Sans catégorie",
|
"PopCorn Live": "Sans catégorie",
|
||||||
}
|
}
|
||||||
mapping_tag = {
|
mapping_tag = {
|
||||||
"Théâtre": "théâtre",
|
"Théâtre": "🎭 théâtre",
|
||||||
"Danse": "danse",
|
"Danse": "💃 danse",
|
||||||
"Rencontre": None,
|
"Rencontre": None,
|
||||||
"Sortie de résidence": "sortie de résidence",
|
"Sortie de résidence": "sortie de résidence",
|
||||||
"PopCorn Live": None,
|
"PopCorn Live": None,
|
||||||
|
@ -22,7 +22,7 @@ class CExtractor(TwoStepsExtractor):
|
|||||||
for e in data["events"]:
|
for e in data["events"]:
|
||||||
self.add_event_url(e["url"])
|
self.add_event_url(e["url"])
|
||||||
if e["tag"] == "Gratuit":
|
if e["tag"] == "Gratuit":
|
||||||
self.add_event_tag(e["url"], "gratuit")
|
self.add_event_tag(e["url"], "💶 gratuit")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise Exception("Cannot extract events from javascript")
|
raise Exception("Cannot extract events from javascript")
|
||||||
@ -53,7 +53,7 @@ class CExtractor(TwoStepsExtractor):
|
|||||||
if description is None:
|
if description is None:
|
||||||
description = ""
|
description = ""
|
||||||
|
|
||||||
tags = ["concert"]
|
tags = ["🎵 concert"]
|
||||||
|
|
||||||
link_calendar = soup.select('a[href^="https://calendar.google.com/calendar/"]')
|
link_calendar = soup.select('a[href^="https://calendar.google.com/calendar/"]')
|
||||||
if len(link_calendar) == 0:
|
if len(link_calendar) == 0:
|
||||||
|
@ -58,7 +58,7 @@ class CExtractor(TwoStepsExtractor):
|
|||||||
end_day = Extractor.guess_end_day(start_day, start_time, end_time)
|
end_day = Extractor.guess_end_day(start_day, start_time, end_time)
|
||||||
|
|
||||||
url_human = event_url
|
url_human = event_url
|
||||||
tags = ["concert"]
|
tags = ["🎵 concert"]
|
||||||
|
|
||||||
image = soup.select("wow-image img[fetchpriority=high]")
|
image = soup.select("wow-image img[fetchpriority=high]")
|
||||||
if image:
|
if image:
|
||||||
|
@ -10,7 +10,7 @@ class CExtractor(TwoStepsExtractor):
|
|||||||
if not category:
|
if not category:
|
||||||
return None
|
return None
|
||||||
mapping = {"Concerts": "Fêtes & Concerts"}
|
mapping = {"Concerts": "Fêtes & Concerts"}
|
||||||
mapping_tag = {"Concerts": "concert"}
|
mapping_tag = {"Concerts": "🎵 concert"}
|
||||||
if category in mapping:
|
if category in mapping:
|
||||||
return mapping[category], mapping_tag[category]
|
return mapping[category], mapping_tag[category]
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user