[retry] On 8/8/15, Brian Wolff bawolff@gmail.com wrote:
On 8/8/15, Nicolas Vervelle nvervelle@gmail.com wrote:
Hi,
Is there a way through the API to list all possible URL that can be used to link to an article ?
For example, a siteinfo request for enwiki[1] gives a few possible URL:
- with server and articlepath, you have URL like
http://en.wikipedia.org/wiki/$1
- with server and script, you have URL like
http://en.wikipedia.org/w/index.php?title=$1
But, is it possible to get all other possible URL ? For example, the URL for the mobile website: http://en.m.wikipedia.org/...
My goal is to detect external links in articles that could be replaced by an internal link or a interwiki link.
Thanks, Nico
[1] https://en.wikipedia.org/w/api.php?continue=&siprop=general&action=q...
Generally no... Lots of it is handled on the webserver level, and MediaWiki doesn't even know.
e.g. Things like https://en.wikipedia.org/?curid=1234 ( [[Acoustic theory]]) work on Wikipedia, but is really determined by how your web server is set up.
And also all sorts of non-standard things, like https://en.wikipedia.org/wiki.cgi?Foo for backwards compatability with usemodwiki.
You've also got things like
http://en-wp.org/ http://en-wp.com etc
http://git.wikimedia.org/blob/operations%2Fpuppet/production/modules%2Fmedia...
May be helpful to you in terms of other domains.
--
- bawolff
mediawiki-api@lists.wikimedia.org