Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download images with MediaWiki API?

Is it possible to download images from Wikipedia with MediaWiki API?

like image 953
Suzan Cioc Avatar asked Sep 19 '12 17:09

Suzan Cioc


1 Answers

No, it is not possible to get the images via the API. Images in a MediaWiki are stored just in folders, not in a database and are not delivered dynamically (more information on that in the Manual:Image administration).

However, you can retrieve the URLs of those image files via the API. For example see the API:Allimages list or imageinfo property querymodules. Then you can download the files from those URLs with your favourite tool (curl, wget, whatever).

If your question is about downloading all images from Wikipedia, meta:data dumps would be a good start. You also may ask on the data-dump mailing list on how to sync with a repository like Wikimedia Commons.

like image 123
Bergi Avatar answered Sep 28 '22 14:09

Bergi