Correction dans le cas où on n'a pas de catégorie
This commit is contained in:
parent
1a06c45acc
commit
0a5470e73d
@ -28,8 +28,8 @@ from src.agenda_culturel.import_tasks.extractor_facebook import *
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
u2e = URL2Events(ChromiumHeadlessDownloader(), FacebookEventExtractor(single_event=True))
|
||||
url="https://www.facebook.com/events/877079547620370/877079557620369/?active_tab=about"
|
||||
u2e = URL2Events(ChromiumHeadlessDownloader(), FacebookEventExtractor())
|
||||
url="https://www.facebook.com/events/s/tour-du-sud-invite-koum/430014373384441/"
|
||||
|
||||
events = u2e.process(url, cache = "fb.html", published = True)
|
||||
|
||||
|
@ -260,7 +260,7 @@ class FacebookEventExtractor(Extractor):
|
||||
logger.warning("published: " + str(published))
|
||||
event["published"] = published
|
||||
|
||||
if "category" in default_values:
|
||||
if default_values and "category" in default_values:
|
||||
event["category"] = default_values["category"]
|
||||
self.add_event(**event)
|
||||
return self.get_structure()
|
||||
|
Loading…
Reference in New Issue
Block a user