Skip to content

JerboaBurrow/GetImagesFromWikiMediaWithAttributions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Usage

To get 3 images of cheese,

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 2 3

and the attributions.json,

{
    "1": {
        "Attribution": "",
        "LicenseShortName": "Public domain",
        "LicenseUrl": "",
        "Artist": "<bdi><a href=\"https://en.wikipedia.org/wiki/en:Clara_Peeters\" class=\"extiw\" title=\"w:en:Clara Peeters\"><span title=\"Flemish painter (1594-1657)\">Clara Peeters</span></a>\n</bdi>"
    },
    "2": {
        "Attribution": "",
        "LicenseShortName": "Public domain",
        "LicenseUrl": "",
        "Artist": "Original photo by <a rel=\"nofollow\" class=\"external text\" href=\"http://pdphoto.org/\">John Sullivan</a>. 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 <a href=\"//commons.wikimedia.org/wiki/User:Yann\" title=\"User:Yann\">Yann Forget</a>\u00a0/\u00a0<a class=\"external text\" href=\"https://commons.wikimedia.org\">Wikimedia Commons</a>",
        "LicenseShortName": "CC BY-SA 4.0",
        "LicenseUrl": "https://creativecommons.org/licenses/by-sa/4.0",
        "Artist": "<a href=\"//commons.wikimedia.org/wiki/User:Yann\" title=\"User:Yann\">Yann Forget</a>"
    }
}

Rights

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

Releases

No releases published

Packages

No packages published

Languages