如何从信息框中获取到Wikipedia上图像的链接? [英] How do I get link to an image on wikipedia from the infobox?

查看:87
本文介绍了如何从信息框中获取到Wikipedia上图像的链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在解析Wikipedia信息框,我注意到某些信息框具有图像字段-这些字段保存藏在Wikipedia某处的图像文件的名称.但是,它们只包含文件名,而不是实际的链接.

I'm parsing wikipedia infoboxes and I noticed that some infoboxes have image fields - these fields hold names of image files stashed on wikipedia somewhere. However they just contain the name of the file as is as opposed to the actual link.

我检查了真实实时信息框上图像的链接,这些链接似乎并非来自一个来源,但来源各不相同.考虑到我只有信息框条目中的图像名称,如何才能超链接到Wikipedia上的图像.

I checked the links of the images on real live infoboxes and the links do not seem to be from one source but the sources vary. How can I hyperlink to an image on wikipedia considering I only have the name of the image from an infobox entry.

推荐答案

您是否尝试过http://en.wikipedia.org/wiki/File:filename.jpg?即使这些文件位于Wikimedia Commons上,上面的URL仍然应该起作用.

Have you tried http://en.wikipedia.org/wiki/File:filename.jpg ? Even if the files are located on Wikimedia Commons, the above URL should still work.

您是否正在尝试热链接图像?如果是这样,Wikipedia禁止热链接. http://commons.wikimedia.org/wiki/Commons:Reusing_content_outside_Wikimedia#Hotlinking

Are you trying to hotlink the image? If so, Wikipedia prohibits hotlinking. http://commons.wikimedia.org/wiki/Commons:Reusing_content_outside_Wikimedia#Hotlinking

更新2019年1月10日:链接为现在允许:

热链接或InstantCommons :可以直接在 通过使用以下方法建立MediaWiki Wiki,在另一个网站内建立公共空间: InstantCommons,...

Hotlinking or InstantCommons: It is possible to use files directly on Commons within another website, by setting up a MediaWiki wiki with InstantCommons, ...

这篇关于如何从信息框中获取到Wikipedia上图像的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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