Hi Greg,

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
information?
- 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.

Good luck!

Merlijn

On 22 July 2012 07:22, Gregory Varnum <[email protected]> wrote:
> Having problems with pageimport.py on a third-party wiki (WikiQueer).
> 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
> failed.
>
> Here's the "test" script I'm working from:
>
> import wikipedia as pywikibot
> from pageimport import *
> def main():
>   wanted_category_title = "Apple"
>   enwiki_site = pywikibot.getSite()
>   importerbot = Importer(enwiki_site) # Inizializing
>   importerbot.Import(wanted_category_title,project='wikipedia', prompt =
> True)
> try:
>     main()
> finally:
>     pywikibot.stopme()
>
>
> 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.
>
> Thanks!
> -greg aka varnent
>
>
> -------
> Gregory Varnum
> Lead, Aequalitas Project
> Lead Administrator, WikiQueer
> Founding Principal, VarnEnt
> @GregVarnum
> fb.com/GregVarnum
>
>
> _______________________________________________
> Pywikipedia-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>

_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to