使用MediaWiki API下载图像? [英] Download images with MediaWiki API?

查看:91
本文介绍了使用MediaWiki API下载图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用MediaWiki API从Wikipedia下载图像?

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

推荐答案

否,无法通过API获取图像. MediaWiki中的图像仅存储在文件夹中,而不是数据库中,并且不会动态传递(有关手册:图像管理).

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).

但是,您可以通过API检索那些图像文件的URL.例如,请参见 API:Allimages列表

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).

如果您的问题是要从Wikipedia下载所有图像,则 meta:数据转储成为一个好的开始.您还可以在数据转储邮件列表中询问如何与Wikimedia Commons之类的存储库同步.

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.

这篇关于使用MediaWiki API下载图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆