Upload images using MediaWiki API?

Can I upload images from Wikipedia using the MediaWiki API?

+4
source share
1 answer

No, it is not possible to get images through the API. Images in MediaWiki are stored only in folders, not in the database, and are not delivered dynamically (for more information on this, see Manual: Image Administration ).

However, you can get the URLs of these image files through the API. For example, see the API: a list of all images or the imageinfo querymodules property . Then you can download files from these URLs using your favorite tool ( curl , wget , whatever).

If your question is about downloading all the images from Wikipedia, meta: data dumps would be a good start. You can also request a dump list on how to synchronize with the repository, for example, on Wikimedia Commons.

+9
source

Source: https://habr.com/ru/post/1435114/


All Articles