feature: download fotos added

This commit is contained in:
Prof. Dr. Matthias Jung DL9MJ
2025-05-16 16:18:49 +02:00
parent 7cc82e34e8
commit b25170296e
3 changed files with 15 additions and 0 deletions
+13
View File
@@ -79,3 +79,16 @@ class Download:
json.dump(result, f, indent=4)
f.close()
def download_photos(cls) :
print("Downloading photos")
photos = cls.api.get(
"items/Fotos",
params=None
)
for photo in tqdm(photos):
data = cls.api.get_file("assets/" + photo["photo"])
file = open("./data/photo/" + str(photo["id"]) + ".jpg", "wb")
file.write(data)
file.close()