On Tue, Feb 25, 2020 at 1:27 AM MusikAnimal <musikanimal(a)gmail.com> wrote:
Unfortunately there's no proper log of redirect
changes (I recently filed <
https://phabricator.wikimedia.org/T240065> for this). There are change
tags
<https://www.mediawiki.org/wiki/Help:Tags> that identify redirect changes
-- "mw-new-redirect" and "mw-changed-redirect-target", specifically
-- but
I am not sure if this is easily searchable via the action API. Someone on
this list might know.
You can do
https://en.wikipedia.org/w/api.php?action=query&titles=2019%E2%80%9320%…
or
https://en.wikipedia.org/w/api.php?action=query&titles=2019%E2%80%9320%…
(You cannot do both in one query, you can only specify one tag at a time).
Furthermore, it looks like given a revision id, you would have to determine
where it redirects yourself, which is unfortunate. I suppose you could look
at
https://en.wikipedia.org/w/api.php?action=parse&oldid=941491141&for…
(taking the oldid as the revid from the other query) and either try and
parse the html, or just assume if there is only one main namespace link,
that that is the right one.
Also keep in mind, really old revisions won't have those tags.
--
Brian