Fix JSON error caused by bad path
mwclient now assumes a path prefix of `/w/` which causes an error. This fixes that path in the example and asserts a path of `/` in the code Fixes #133
This commit is contained in:
Родитель
5bd674675a
Коммит
a9b4c45f63
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"username": "",
|
||||
"password": "",
|
||||
"site": "wiki.mozilla.org/api.php",
|
||||
"site": "wiki.mozilla.org",
|
||||
"useragent": "Infosec wiki updater, based on mwclient",
|
||||
"repos": "https://github.com/mozilla/wikimo_content",
|
||||
"basedir" : ".",
|
||||
|
|
2
sync.py
2
sync.py
|
@ -26,7 +26,7 @@ import getopt
|
|||
import subprocess
|
||||
|
||||
def connect(config):
|
||||
site = mwclient.Site((config['site']), clients_useragent=config['useragent'])
|
||||
site = mwclient.Site((config['site']), path='/', clients_useragent=config['useragent'])
|
||||
site.login(config['username'], config['password'])
|
||||
return site
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче