2 Prints the rev_id, characters and hash of all revisions to User:EpochFail.
7 sys.path.insert(0, os.path.abspath(os.getcwd()))
12 api_session = api.Session("https://en.wikipedia.org/w/api.php")
14 revisions = api_session.revisions.query(
15 properties={'ids', 'content'},
16 titles={"User:EpochFail"},
23 "{0} ({1} chars): {2}".format(
25 len(rev.get('*', "")),
26 hashlib.sha1(bytes(rev.get('*', ""), 'utf8')).hexdigest()