Skip to content

Commit

Permalink
Merge pull request #25 from RhinosF1/Version-1-final-pr
Browse files Browse the repository at this point in the history
Release version 1
  • Loading branch information
RhinosF1 authored Jul 23, 2020
2 parents 0025714 + beaf373 commit 646afc6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def remove():
except IndexError:
opusername = input("Operator Username: ")
fromheader = input("Bot Email: ")
username = input("Bot Username: ")
headers = {
'User-Agent': 'BOT: ' + opusername + '@TestWikiAutoInactive-v1rc2',
'User-Agent': 'BOT: ' + opusername + '@TestWikiAutoInactive-v1',
'From': fromheader
}
S = Session()
Expand Down Expand Up @@ -75,7 +76,7 @@ def remove():
fromheader = EMAIL
print("Your email was replaced with " + fromheader)
headers = {
'User-Agent': 'BOT: ' + opusername + '@TestWikiAutoInactive-v1rc2',
'User-Agent': 'BOT: ' + opusername + '@TestWikiAutoInactive-v1',
'From': fromheader # rewrite header to user email
}
configfile = open('userinfo.cfg', 'w+')
Expand Down Expand Up @@ -119,7 +120,8 @@ def remove():
"user": inactiveuser,
"remove": "bot|sysop|bureaucrat|consul|testgroup|autopatrolled|confirmed|rollbacker|interface-admin|flow-bot|checkuser|interwiki-admin|oversight|steward",
"reason": "per [[TestWiki:Inactivity|Inactivity report]]",
"token": USERRIGHTS_TOKEN}
"token": USERRIGHTS_TOKEN
}
count = count + 1
R = S.post(URL, data=PARAMS_4, headers=headers)
DATA = R.json()
Expand Down

0 comments on commit 646afc6

Please sign in to comment.