Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mwclient
- username = u'WikiSysop'
- password = u's3cr3t'
- #site = mwclient.Site(('https', host), path = '/mediawiki-1.14.0rc1/')
- host = u'tools'
- site = mwclient.Site(host, path=u'/mediawiki-1.14.0rc1/')
- site.login(username, password)
- # Edit page
- appname = u"Spencer Johnson and Co."
- pagename = u'Automatic Export of %s' % (appname)
- page = site.Pages[pagename]
- text = page.edit()
- print 'Text in sandbox:', text.encode('utf-8')
- page.save(text + u'\nGetting more and better complex.', summary = 'Auto-export.')
Add Comment
Please, Sign In to add comment