Mwclient: Connect to a site

From Glitchdata
Jump to navigation Jump to search

import mwclient
from pprint import pprint

site = mwclient.Site('https', 'wiki.glitchdata.com', path='/')
# Ensure you have SSL enabled.
# site.login('username', 'password')

page = site.pages['mwclient']
text = page.text()
pprint(text)



Links