Fix d'une limitation imports fb non bloquant
This commit is contained in:
parent
e4627a964a
commit
6d91f5aea9
@ -29,7 +29,7 @@ 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/872781744074648"
|
||||
url="https://www.facebook.com/events/877079547620370/877079557620369/?active_tab=about"
|
||||
|
||||
events = u2e.process(url, cache = "fb.html", published = True)
|
||||
|
||||
|
@ -33,7 +33,6 @@ class FacebookEventExtractor(Extractor):
|
||||
"name",
|
||||
"price_info",
|
||||
"cover_media_renderer",
|
||||
"event_creator",
|
||||
"id",
|
||||
"day_time_sentence",
|
||||
"event_place",
|
||||
@ -155,6 +154,7 @@ class FacebookEventExtractor(Extractor):
|
||||
if isinstance(array, dict):
|
||||
seen = False
|
||||
for i, ks in enumerate(FacebookEventExtractor.FacebookEvent.keys):
|
||||
# DEBUG: print([k for k in ks if k in array], "il manque", [k for k in ks if k not in array])
|
||||
if len(ks) == len([k for k in ks if k in array]):
|
||||
seen = True
|
||||
if event is None:
|
||||
|
Loading…
Reference in New Issue
Block a user