Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> import mwclient
- >>> site = mwclient.Site('en.wikipedia.org')
- >>> site.login('Pfctdayelise','password')
- >>> page = site.Pages['User:Pfctdayelise/Test']
- >>> text = page.edit()
- >>> print text.encode('utf-8')
- Hello.
- >>> newtext = "\n\nTesting the write api without logging in.\n"
- >>> page.save(text+newtext,summary='testing write api')
- >>> print page.edit()
- Hello.
- Testing the write api without logging in.
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement