On alerte que l'heure manque dans les imports de la raymonde
This commit is contained in:
parent
115644c112
commit
bb2a6b04e5
@ -32,20 +32,22 @@ class CExtractor(TwoStepsExtractorNoPause):
|
|||||||
|
|
||||||
title = soup.select_one(".showDesc h4 a.summary").text
|
title = soup.select_one(".showDesc h4 a.summary").text
|
||||||
start_day = soup.select_one(".showDate .value-title")
|
start_day = soup.select_one(".showDate .value-title")
|
||||||
|
start_time = None
|
||||||
|
|
||||||
if not start_day is None:
|
if not start_day is None:
|
||||||
start_day = start_day["title"]
|
start_day = start_day["title"]
|
||||||
if not start_day is None:
|
if not start_day is None:
|
||||||
start_day = start_day.split("T")[0]
|
start_day = start_day.split("T")[0]
|
||||||
if start_day is None:
|
|
||||||
print("impossible de récupérer la date")
|
|
||||||
return
|
|
||||||
description = soup.select_one('.showDetails.description').text
|
description = soup.select_one('.showDetails.description').text
|
||||||
image = soup.select('.showDetails.description img')
|
image = soup.select('.showDetails.description img')
|
||||||
if not image is None:
|
if not image is None:
|
||||||
image_alt = image[-1]["alt"]
|
image_alt = image[-1]["alt"]
|
||||||
image = image[-1]["src"]
|
image = image[-1]["src"]
|
||||||
|
|
||||||
|
if start_time is None:
|
||||||
|
title += " - Attention: la date n'a pu être extraite"
|
||||||
|
|
||||||
self.add_event_with_props(
|
self.add_event_with_props(
|
||||||
default_values,
|
default_values,
|
||||||
event_url,
|
event_url,
|
||||||
@ -58,7 +60,7 @@ class CExtractor(TwoStepsExtractorNoPause):
|
|||||||
recurrences=None,
|
recurrences=None,
|
||||||
uuids=[event_url],
|
uuids=[event_url],
|
||||||
url_human=event_url,
|
url_human=event_url,
|
||||||
start_time=None,
|
start_time=start_time,
|
||||||
end_day=None,
|
end_day=None,
|
||||||
end_time=None,
|
end_time=None,
|
||||||
published=published,
|
published=published,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user