Hi,
I am trying to compile a list of duplicate images in Wikimedia Commons. I am iterating through the list of images using the generator=allimages API and using the continue option to get the next set. But the api gets stuck at 𪎥-seal.svg and it does not return the next set or the continue option.
Here is the url I am using: https://commons.wikimedia.org/w/api.php?action=query&generator=allimages...
Can anyone help me with this? If there is an alternative, that would be great.
Thanks, Sreejith Kulamgarath.
Maybe it's the last element in the list?
20.05.2021 21:27, Sreejith K. пишет:
Hi,
I am trying to compile a list of duplicate images in Wikimedia Commons. I am iterating through the list of images using the generator=allimages API and using the continue option to get the next set. But the api gets stuck at 𪎥-seal.svg and it does not return the next set or the continue option.
Here is the url I am using: https://commons.wikimedia.org/w/api.php?action=query&generator=allimages... https://commons.wikimedia.org/w/api.php?action=query&generator=allimages&prop=duplicatefiles&gaifrom=%F0%AA%8E%A5-seal.svg&gailimit=100&format=json&continue=
Can anyone help me with this? If there is an alternative, that would be great.
Thanks, Sreejith Kulamgarath.
Mediawiki-api mailing list -- mediawiki-api@lists.wikimedia.org To unsubscribe send an email to mediawiki-api-leave@lists.wikimedia.org
Interestingly, using instead the rawcontinue does not give you a boolean (as described in the API help near the bottom https://commons.wikimedia.org/w/api.php?action=help&modules=query), but the next gaicontinue filename
https://commons.wikimedia.org/w/api.php?action=query&generator=allimages...
{
"query-continue": { "allimages": { "gaicontinue": "3E-100.jpg" } }, "query": { "pages": { "4236541": { "pageid": 4236541, "ns": 6, "title": "File:3E-003 PTKiGK Zabrze Naklo Slaskie 18062008 01.jpg" } } } }
Thad https://www.linkedin.com/in/thadguidry/ https://calendly.com/thadguidry/
Hi Thad!
Yup. The 'rawcontinue' is a boolean (present or not). That's correct.
Note that, that 'boolean' is related to the type of that parameter 'rawcontinue', and not to the type of a response section activated by that parameter itself.
Having said I also see room for improvement in our dear API doc... ihih
Cheers!
-boz
On Thu, 2021-05-20 at 10:24 -0500, Thad Guidry wrote:
Interestingly, using instead the rawcontinue does not give you a boolean (as described in the API help near the bottom), but the next gaicontinue filename
https://commons.wikimedia.org/w/api.php?action=query&generator=allimages...
{ "query-continue": { "allimages": { "gaicontinue": "3E-100.jpg" } }, "query": { "pages": { "4236541": { "pageid": 4236541, "ns": 6, "title": "File:3E-003 PTKiGK Zabrze Naklo Slaskie 18062008 01.jpg" } } } } Thad https://www.linkedin.com/in/thadguidry/ https://calendly.com/thadguidry/ _______________________________________________ Mediawiki-api mailing list -- mediawiki-api@lists.wikimedia.org To unsubscribe send an email to mediawiki-api-leave@lists.wikimedia.org
'rawcontinue' is deprecated, you should just merge the value of the 'continue' field in the response with your request parameters to continue. Special:ApiSandbox has a continue button if you want to see how it works.
This seems like a very inefficient way of searching for duplicates, though. Have you looked at Special:ListDuplicatedFiles?
It would be nice to have someone fix the documentation (that seems to be self-documenting as described here https://commons.wikimedia.org/wiki/Commons:API) I asked a question to Magnus on the talk page https://commons.wikimedia.org/wiki/Commons_talk:API of that asking where the API source is, thinking I might help contribute to fix the docs.
Thad https://www.linkedin.com/in/thadguidry/ https://calendly.com/thadguidry/
On Thu, May 20, 2021 at 11:23 AM Gergo Tisza gtisza@wikimedia.org wrote:
'rawcontinue' is deprecated, you should just merge the value of the 'continue' field in the response with your request parameters to continue. Special:ApiSandbox has a continue button if you want to see how it works.
This seems like a very inefficient way of searching for duplicates, though. Have you looked at Special:ListDuplicatedFiles? _______________________________________________ Mediawiki-api mailing list -- mediawiki-api@lists.wikimedia.org To unsubscribe send an email to mediawiki-api-leave@lists.wikimedia.org
mediawiki-api@lists.wikimedia.org