I'm trying to set up both MediaWiki and PyWikipediaBot and am
running into some teething problems.
My MW instance is installed (and appears to be functioning). I
created an account named ProtegeBot and put it in the Bot group.
I also created the following files:
$ cat user-config.py
mylang = 'en'
usernames['PrF']['en'] = u'ProtegeBot'
family = 'PrF'
$ cat families/PrF_family.py
# -*- coding: utf-8 -*-
import family
# Rich Morin's test wiki for SMI-related hacks.
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'PrF'
self.langs = { 'en': 'www.cfcl.com' }
self.namespaces[4] = {
'_default': [u'ProtegeWiki',
self.namespaces[4]['_default']],
}
self.namespaces[5] = {
'_default': [u'ProtegeWiki talk',
self.namespaces[5]['_default']],
}
self.content_id = "mainContent"
def RversionTab(self, code):
return r'<li\s*><a
href=".*?title=.*?&action=history".*?>.*?</a></li>'
def version(self, code):
return "1.13.1"
def scriptpath(self, code):
return '/smi_xmw/mediawiki-1.13.1/index.php'
def apipath(self, code):
raise NotImplementedError(
"The PrF family does not support api.php")
I am able to log into the Wiki as ProtegeBot, using the password I set.
However, when I try to run PyWikipediaBot, I get this error:
$ python upload.py -v $D/All_ProtegeLogo.gif
Checked for running processes. 1 processes currently running,
including the current process.
Pywikipediabot [http] trunk/pywikipedia (r5914, Sep 22 2008, 16:15:37)
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)]
Getting information for site PrF:en
Password for user ProtegeBot on PrF:en:
Logging in to PrF:en as ProtegeBot
Login failed. Wrong password or CAPTCHA answer?
Password for user ProtegeBot on PrF:en:
Help?
-r
P.S. I'm not sure about the difference between the "family" name and the
"sitename", so I used PrF for both. LocalSettings.php sez:
$wgSitename = "PrF";
--
http://www.cfcl.com/rdm Rich Morin
http://www.cfcl.com/rdm/resume rdm(a)cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841
Technical editing and writing, programming, and web development