[WikiEN-l] exporting sets of pages

Rajarshi Guha rajarshi.guha at gmail.com
Sun Jan 9 16:40:04 UTC 2011


On Wed, Jan 5, 2011 at 7:06 AM, Tim Starling <tstarling at wikimedia.org> wrote:
> On 05/01/11 10:03, Rajarshi Guha wrote:
>> Is there a way I could export the articles containing Drugboxes or do
>> I need to install Wikipedia locally?
>
> The best way to do it would be to get the list of articles using the API:
>
> http://www.mediawiki.org/wiki/API

Thanks for the pointer. I've been trying this, but can't seem to get
the same information as a manual approach.

For example, viewing

http://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Template:Drugbox&namespace=0&limit=5000&hidetrans=

gives me a page listing pages that link to the Template:Drugbox page.

However, if I construct an API call:

http://en.wikipedia.org/w/api.php?action=query&list=backlinks&bltitle=Template%3ADrugbox&blnamespace=0

I get no results.

If I drop the blnamespace parameter I get a set of links, but as far
as I can tell, none of them are in the Main namespace.

I must be missing something obvious and any pointers to getting it to
work would be much appreciated

Thanks,
-- 
Rajarshi Guha
NIH Chemical Genomics Center



More information about the WikiEN-l mailing list