On Fri, Jul 23, 2010 at 02:03:03PM -0500, Python Script wrote:
I'm trying to list all the pages in the user
namespace on a wiki, NOT the
main namespace, but I can't figure this out. Here's what I'm using to query
a generator for "allpages":
{
'action':'query',
'generator':'allpages',
'gaplimit':'5',
'gapfrom':'Foo,
'prop':'links|categories',
'plnamespaces':'2'
}
This query looks at the first 5 pages in the main namespace starting
from Foo, and returns the categories and links to the User namespace for
each of those page. plnamespace applies to the prop=links; allpages uses
apnamespace, and since allpages is being used as a generator it needs to
be gapnamespace:
{
'action':'query',
'generator':'allpages',
'gapnamespaces':'2'
'gaplimit':'5',
'gapfrom':'Foo,
'prop':'links|categories',
}