2 Prints the rev_id, characters and hash of all revisions to Willy_on_Wheels.
10 sys.path.insert(0, os.path.abspath(os.getcwd()))
17 api_session = api.Session("https://en.wikipedia.org/w/api.php")
19 print("(EN) Wikipedia credentials...")
20 username = input("Username: ")
21 password = getpass.getpass("Password: ")
22 api_session.login(username, password)
24 revisions = api_session.deleted_revisions.query(
25 properties={'ids', 'content'},
26 titles={'Willy on Wheels'},
32 "{0} ({1} chars): {2}".format(
34 len(rev.get('*', "")),
35 hashlib.sha1(bytes(rev.get('*', ""), 'utf8')).hexdigest()