added random image finding and downloading function

downloads a random image from Wikipedia, converts it to png, and renames it to random_image.png - will rewrite the image if one already exists.
Filters images:
| Filter             |     Current value | Meaning                              |
| ------------------ | ----------------: | ------------------------------------ |
| MIME type          | JPEG / PNG / WebP | Rejects SVG, GIF, TIFF, etc.         |
| Width              |          ≥ 300 px | Rejects very narrow/small images     |
| Height             |          ≥ 300 px | Rejects very short/small images      |
| Original file size |           ≤ 20 MB | Avoids huge files                    |
| Thumbnail          |           1280 px | Downloads a reasonably sized version |
This commit is contained in:
RealEvoranz
2026-08-24 14:32:48 -04:00
parent 1a67432211
commit 9d867b29c6
2 changed files with 506 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
*.png
*.txt
random_image.json
Todo.md
data-dir/
__pycache__/