Manual:Pywikibot/illustrate wikidata.py

illustrate_wikidata.py is a script to add images to Wikidata items.

Concept
On Wikimedia wiki's Extension:PageImages is installed. This adds a new page property "page_image". This bot uses that information to add a claim to Wikidata. By default P18 (image) is used, but it's also possible to add other properties as long as the property is of type commonsMedia.

Syntax
The bot expects a generator:

You can change the property to be add. For example to add P41 (flag image):