daily pastebin goal
4%
SHARE
TWEET

pfctdayelise

a guest Aug 26th, 2008 1,047 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. >>> import mwclient
  2. >>> site = mwclient.Site('en.wikipedia.org')
  3. >>> site.login('Pfctdayelise','password')
  4. >>> page = site.Pages['User:Pfctdayelise/Test']
  5. >>> text = page.edit()
  6. >>> print text.encode('utf-8')
  7. Hello.
  8. >>> newtext = "\n\nTesting the write api without logging in.\n"
  9. >>> page.save(text+newtext,summary='testing write api')
  10. >>> print page.edit()
  11. Hello.
  12.  
  13. Testing the write api without logging in.
  14. >>>
RAW Paste Data
Top