Photomat -> Fotomat

This commit is contained in:
Jean-Marie Favreau
2024-04-20 13:54:28 +02:00
parent aa878b8fb3
commit 44b6458d73
7 changed files with 43 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
*.json
*.html
*.ical
*.xml

View File

@@ -28,14 +28,14 @@ from src.agenda_culturel.import_tasks.custom_extractors import *
if __name__ == "__main__":
u2e = URL2Events(SimpleDownloader(), LePhotomatExtractor())
u2e = URL2Events(SimpleDownloader(), LeFotomatExtractor())
url = "https://www.lefotomat.com/feed"
url_human = "https://www.lefotomat.com/"
try:
events = u2e.process(url, url_human, cache = "cache-lephotomat.xml", default_values = {"location": "Le Photomat'"}, published = True)
events = u2e.process(url, url_human, cache = "cache-lefotomat.xml", default_values = {"location": "Le Fotomat'"}, published = True)
exportfile = "events-lephotomat.json"
exportfile = "events-lefotomat.json"
print("Saving events to file {}".format(exportfile))
with open(exportfile, "w") as f:
json.dump(events, f, indent=4, default=str)