summaryrefslogtreecommitdiff
path: root/games_bot.py
diff options
context:
space:
mode:
authorBrett Weiland <brett_weiland@bpcspace.com>2020-11-02 08:14:43 -0600
committerBrett Weiland <brett_weiland@bpcspace.com>2020-11-02 08:14:43 -0600
commit8a1b282df20e4e0ed1c426c11b35b7cb7432c137 (patch)
tree7c3da545c8f5f0683089385c93ddbe19f546b508 /games_bot.py
parentc6413e5c0d2f04232e37391c8b5b62277562d065 (diff)
new file: games_bot.py
modified: post_bot.py new file: qs_to_list.py
Diffstat (limited to 'games_bot.py')
-rwxr-xr-xgames_bot.py35
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
+ })
+