@@ -24,19 +24,19 @@ from src.agenda_culturel.import_tasks.importer import URL2Events
|
||||
|
||||
if __name__ == "__main__":
|
||||
u2e = URL2Events(SimpleDownloader(), mobilizon.CExtractor())
|
||||
url = "https://mobilizon.fr/@attac63/events?"
|
||||
url_human = "https://mobilizon.fr/@attac63/events"
|
||||
url = "https://keskonfai.fr/events/166fca9c-e758-437c-8002-9a55d822e34d"
|
||||
url_human = "https://keskonfai.fr/events/166fca9c-e758-437c-8002-9a55d822e34d"
|
||||
|
||||
try:
|
||||
events = u2e.process(
|
||||
url,
|
||||
url_human,
|
||||
cache="cache-attac63.html",
|
||||
cache="cache-single-event-mobilizon.html",
|
||||
default_values={},
|
||||
published=True,
|
||||
)
|
||||
|
||||
exportfile = "events-attac63.json"
|
||||
exportfile = "events-single-event-mobilizon.json"
|
||||
print("Saving events to file {}".format(exportfile))
|
||||
with open(exportfile, "w") as f:
|
||||
json.dump(events, f, indent=4, default=str)
|
||||
|
Reference in New Issue
Block a user