Closed
Description
import dokuwiki
try:
url = "http://my.page.com/dokuwiki"
nick = "myname"
pwd = "mypwd"
wiki = dokuwiki.DokuWiki(url, nick, pwd)
html = wiki.pages.html('start')
print(html)
except (dokuwiki.DokuWikiError, Exception) as err:
print('unable to connect: %s' % err)
gives me Exception
unable to connect: invalid login or password!
while
from xmlrpc.client import ServerProxy
from urllib.parse import urlencode
URL = "http://my.page.com/dokuwiki"
USER = "myname"
PWD = "mypwd"
url = '%s/lib/exe/xmlrpc.php?%s' % (URL, urlencode({'u': USER, 'p': PWD}))
proxy = ServerProxy(url)
print(proxy.dokuwiki.getVersion())
# should print something like: Release 2018-04-22b "Greebo"
for x in proxy.dokuwiki.search('start'):
print(x["snippet"])
break
does everything i want...
Any idea what this could be?
Metadata
Metadata
Assignees
Labels
No labels