tags:

views:

438

answers:

2

Hi guys, 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.

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.

+1  A: 

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.

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

jimyi
Whoa! I didn't know that it was prohibited to hotlink to wikipedia - thanks for informing me that. I actually would like to show the photos that are referenced in the infoboxes I have exported. I would like a way to download these images somehow programatically - how would I get it from wikipedia?
Ali
Consider that I have around a few thousand infoboxes and each info box references one to 3 images.
Ali
@Ali: The page now says that hotlinking is allowed
Casebash
A: 

Asked there, no answer, I need to know

http://en.wikipedia.org/wiki/Wikipedia_talk:Uploading_images#Image_Paths