Hi,
How can I fetch links which are shown in the external links section of every article. It's possible to fetch all external links inside a given page using this query:
http://en.wikipedia.org/w/api.php?action=parse&page=Norway&prop=exte...
But I want to fetch links in External Links section only. What query should I use ?
On Fri, Jul 1, 2011 at 9:23 AM, Siteshwar Vashisht siteshwar@gmail.com wrote:
But I want to fetch links in External Links section only. What query should I use ?
The database stores these links per page, not per section, so you can't obtain this information from the API easily. You could look for the links in the HTML output I guess.
Roan Kattouw (Catrope)
On 7/1/2011 3:03 AM, Roan Kattouw wrote:
On Fri, Jul 1, 2011 at 9:23 AM, Siteshwar Vashisht siteshwar@gmail.com wrote:
But I want to fetch links in External Links section only. What query should I use ?
The database stores these links per page, not per section, so you can't obtain this information from the API easily.
1 ) Get a list of sections using:
http://en.wikipedia.org/w/api.php?action=parse&page=Norway&prop=sect...
Thanks to the wikipedia MOS the External links is generally always called External links, in this case, we have an index of 40.
2 ) Plug that in here:
http://en.wikipedia.org/w/api.php?action=parse&page=Norway%C2%A7ion=40&a...
3 ) Profit
mediawiki-api@lists.wikimedia.org