如何在Wiki API中获取图像URL? [英] How to get image URL in wiki api?

查看:114
本文介绍了如何在Wiki API中获取图像URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我调用用于访问图像URL的Wiki API时,我会得到这样的图像URL,

When I call wiki APIs for accessing image URLs, I get image URLs like this,

File:Ad-tech London 2010 (2).JPG

如何从Wiki API获取此文件的正确URL?

How to get the correct URL of this file from wiki API?

推荐答案

除了 T153497以外,关于图像/缩略图URL的文档很少.您可以使用Special:FilePath和/或thumb.php:

There's little documentation on image/thumbnail URLs besides T153497. You can use Special:FilePath and/or thumb.php:

  • https://commons.wikimedia.org/wiki/Special:FilePath/Ad-tech_London_2010_(2).JPG
  • https://commons.wikimedia.org/wiki/Special:FilePath/Ad-tech_London_2010_(2).JPG?width=200 (to get a thumbnail of 200px width)
  • https://commons.wikimedia.org/w/thumb.php?f=Ad-tech_London_2010_(2).JPG&w=200

这篇关于如何在Wiki API中获取图像URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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