diff options
Diffstat (limited to 'games_bot.py')
-rwxr-xr-x | games_bot.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/games_bot.py b/games_bot.py new file mode 100755 index 0000000..bdd63c9 --- /dev/null +++ b/games_bot.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +import requests +import re +from time import sleep + + +rs = requests.session() +rp = rs.post('https://recolor.me/login?json', data = { + 'action':'login', + 'account_name':'testingaccount1', + 'account_password':'1234', + 'account_cookie':'1'}) + +if not rp.json()['account_id']: + print("wrong login info!") + exit(1) + +rp = rs.get('https://recolor.me/') +key_pos = rp.text.find("site.my_key = \'") + len("site.my_key = ") +#key = rp.text[key_pos:key_pos+32] +key = re.search("site.my_key = \'(.*)\';", rp.text).groups()[0] + +levels = [] +levels.append([1, 0, [3, 2, 0, 3]]) + +rp = rs.post('https://recolor.me/', data = { + 'page':'slide', + 'action':'complete', + 'level':'7', + 'hflip':'1', + 'vflip':'0', + 'solution':'301232', + 'key':key + }) + |