An open API service indexing awesome lists of open source software.

https://github.com/jerboaburrow/getimagesfromwikimediawithattributions

Extract images form a query to Wikimedia, with attributions
https://github.com/jerboaburrow/getimagesfromwikimediawithattributions

downloader images web web-scraping wikimedia wikimedia-commons wikipedia

Last synced: about 1 year ago
JSON representation

Extract images form a query to Wikimedia, with attributions

Awesome Lists containing this project

README

          

### Usage

To get 3 images of cheese,

```bash
python3 script/get_images_from_wikimedia.py cheese -take 3
```
will create a directory ```images/cheese``` with the image files below

| 1.jpg | 2.jpg | 3.jpg |
| :---: | :---: | :---: |
| ![1](https://github.com/user-attachments/assets/0db16e0c-f405-4d57-8a31-72be307089f1) | ![2](https://github.com/user-attachments/assets/f7314cf9-ddbd-4096-8456-25860b6130ac)|![3](https://github.com/user-attachments/assets/3e625112-18d0-43e4-bde6-1d2bec2b3b25)|

and the ```attributions.json```,

```json
{
"1": {
"Attribution": "",
"LicenseShortName": "Public domain",
"LicenseUrl": "",
"Artist": "Clara Peeters\n"
},
"2": {
"Attribution": "",
"LicenseShortName": "Public domain",
"LicenseUrl": "",
"Artist": "Original photo by John Sullivan. Edit own work."
},
"3": {
"Attribution": "This file is not in the public domain. Therefore you are requested to use the following next to the image if you reuse this file: \u00a9 Yann Forget\u00a0/\u00a0Wikimedia Commons",
"LicenseShortName": "CC BY-SA 4.0",
"LicenseUrl": "https://creativecommons.org/licenses/by-sa/4.0",
"Artist": "Yann Forget"
}
}
```
### Rights

- (Output) Files downloaded are subject to any license listed in the ```{path}/{query}/attributions.json``` file.
- The source code is GPLv3