Last modified: 2010-05-15 16:03:23 UTC
Hello, On the #mediawiki channel, I was suggest to request new APIs feature instead of using the HTML's pages with my Bots (that won't work after also some minor changes in the HTML format). So, here I am. I need to use this special page: Special:FileDuplicateSearch with my Bots and I would like to do it trough APIs instead of HTML. It would be really useful for commons and the other wikis in general to catch the duplicated images in the uploading phase. Thanks, Filnik
That's possible already. First, get the file's SHA-1 hash with http://commons.wikimedia.org/w/api.php?action=query&titles=Image:Bombers_of_WW1.ogg&prop=imageinfo&iiprop=sha1 then get a list of all files with that SHA-1 hash with http://commons.wikimedia.org/w/api.php?action=query&list=allimages&aisha1=3caa72f8f594f7c5089224ec8595fee14801eab9 The latter should only list the original title (Image:Bombers_of_WW1.ogg), if it lists other images as well, they're duplicates.
Uhm... a bit hackish but the bots doesn't care too much if the procedure is complicated. So, thanks for the HowTo :-) So, can you close the bug? :-) (not sure if I can/if it's the case that I close it on my own ;-)) Thanks again, Filnik
(In reply to comment #2) > Uhm... a bit hackish but the bots doesn't care too much if the procedure is > complicated. So, thanks for the HowTo :-) No problem. > > So, can you close the bug? :-) (not sure if I can/if it's the case that I close > it on my own ;-)) Did that already. Look at the top of this page, where it says Status: RESOLVED Resolution: WORKSFORME