>
url (
string) – Instead of code and fam, does try to get a Site based on the
URL. Still requires that the family supporting that URL exists.
> From
this I get the impression that pywikibot has a list of mediawiki sites
that it recognises, and if a site isn't on that list, it won't work.
I think you are right, I believe the url parameter is only an alternative way to refer to an existing family, not add a new site.
You will need to create a family file like this under pywikibot/families:
from pywikibot import family
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'localhost'
self.langs = {
'en': 'localhost',
}
self.content_id = "mainContent"
def scriptpath(self, code):
return ''
def path(self, code):
return '/mw/index.php'
def apipath(self, code):
return '/mw/api.php'
--