Sorry for this crazily late response. A few pointers that might help you:
- importerbot.Import basically does a call to Special:Import. Have you
tried whether you can import a page manually there?
- this call gives a result ( 'response, data =
self.site().postForm(...)'), but this data is ignored - if you add a
print response, data
at line 100 (just above the 'import failed'), does that give any extra
- if you know how to use a debugger, try adding 'import pdb;
pdb.set_trace()' instead of that print, and fiddling around with the
response and data variables.
On 22 July 2012 07:22, Gregory Varnum <gregory.varnum(a)gmail.com> wrote:
Having problems with pageimport.py on a third-party
Anyone else having issues with that script?
I'm calling it from a script I'm playing around with - but no luck. It
doesn't error out - but it doesn't import and confirms that the import
Here's the "test" script I'm working from:
import wikipedia as pywikibot
from pageimport import *
wanted_category_title = "Apple"
enwiki_site = pywikibot.getSite()
importerbot = Importer(enwiki_site) # Inizializing
importerbot.Import(wanted_category_title,project='wikipedia', prompt =
On a related note, the ultimate goal is to import pages for "Wanted
Categories" from English Wikipedia into the third-party wiki. Any ideas,
tips or existing code to that end would also be appreciated.
-greg aka varnent
Lead, Aequalitas Project
Lead Administrator, WikiQueer
Founding Principal, VarnEnt
Pywikipedia-l mailing list