Hi Adam,
Thanks for your reply. The qitem api returns missing for this article but the article exists:
https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&...
The Wikipedia page link https://es.wikipedia.org/wiki/Playas_de_L%27Atalaya_y_Focar%C3%B3n is here.
Would you know if there is a way to input article revision ID or pageid instead of source title for the logevents API? The strings seem to be problematic at times. For example, the article 'Rodrigo Flores Álvarez' of 'pt' Wikipedia gives me trouble (I got this article from the cxtranslation list). This page seems to be missing https://pt.wikipedia.org/wiki/Rodrigo_Flores_%C3%81lvarez and perhaps I am not using the logevents API correctly, but it returns empty.
{'batchcomplete': '', 'query': {'logevents': []}}
------------------------------ endpoint = str('pt') + '.wikipedia.org/w/api.php' query_url = "https://%7B0%7D%22.format(endpoint) params = {} params['action'] = 'query' params['list'] = 'logevents' params['format'] = 'json' params['leaction'] = 'delete/delete' params['letitle'] = 'Rodrigo Flores Álvarez' json_response = requests.get(url=query_url, params=params).json()
Thanks again and cheers,
Doris Zhou
On Wed, Oct 27, 2021 at 9:51 AM Adam Wight adam.wight@wikimedia.de wrote:
The "logevents" API should return the same data as Special:Log. For example,
https://en.wikipedia.org/w/api.php?action=query&list=logevents&letit...
This can be filtered further to just delete events, and so on.
But if you only want to know whether an article exists or not, "missing" should be accurate. Can you share some example URLs for which the page exists, but the API returns "missing"?
Kind regards, Adam W.
On 10/27/21 3:40 AM, D Z wrote:
Hello All,
I am doing research investigating the role of machine translation in Wikipedia articles. I am having trouble with how to know if an article
has
been deleted from Wikipedia. Specifically, I am getting a list of
articles
from the cxtranslation list and I would like to know which articles are
no
longer on Wikipedia. I see that there is the deletion log form https://en.wikipedia.org/wiki/Special:Log/delete but is there an API
or
some way to access something like this form so I could check if a mass amount of articles have been deleted?
I have used the Media Wiki API https://en.wikipedia.org/w/api.php to
get
articles and the API returns missing for some articles, but this does not seem to be fully accurate for determining if an article has been deleted because the API has returned 'missing' for articles that do exist.
To summarize, my main question is: given an article language edition and article title, or an article pageid, is there an API to check if the article has been deleted?
Any help would be greatly appreciated!
Thanks,
Doris Zhou _______________________________________________ Wiki-research-l mailing list -- wiki-research-l@lists.wikimedia.org To unsubscribe send an email to
wiki-research-l-leave@lists.wikimedia.org _______________________________________________ Wiki-research-l mailing list -- wiki-research-l@lists.wikimedia.org To unsubscribe send an email to wiki-research-l-leave@lists.wikimedia.org