I am running a MediaWiki wiki, and I am attempting to use pywikipedia to handle some of the administrative tasks.
I have defined the new family, edited the user_config.py file, and I have used the bot to preload some content. However I have a problem: the bot cannot get a page from the server.
As a sample test (run from Python IDE):
import wikipedia site = wikipedia.getSite() page = wikipedia.Page(site,"Test") page.put("This is a test")
And I have a new page (or a reedited page) with the provided content. This is okay.
However: page = wikipedia.Page(site,"Test") print page.get()
returns a NoPage error message.
I have test against Wikipedia using the same installation and I can read the articles without any problems.
I suspect that I might have a problem in either the definition of the family, or the configuration of the wiki. I had already defined families for Wikia and for Wikiversity in Spanish without any problems (but I might have missed something).
On my site, I have some rewrite rules, however a request such as /index.php?title=Test&action=raw works fine. (As does /Test?action=raw and /w-raw/Test ). The wiki is also using a skin designed for that site.
Thank you for your advise.
-- Carlos Th
Carlos Thompson wrote:
On my site, I have some rewrite rules, however a request such as /index.php?title=Test&action=raw works fine. (As does /Test?action=raw and /w-raw/Test ).
This is action=edit. You can override the function "path" in the family file.
The wiki is also using a skin designed for that site.
If this skin changes the regular "history" tab, you should override the function "RversionTab" in the family file, with a regexp that can be used to check if the page exists or not.
pywikipedia-l@lists.wikimedia.org