#!/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 })