def autosolve(): load_dotenv() mml = MATHML() task = 2 auto_solver = AutoSolver(config.BATTLE_2_EXTENSION, task) while True: div = auto_solver.start() math_elements = div.find_all('math') f = sympify(mml.parse(math_elements[1])) g = sympify(mml.parse(math_elements[3])) res = Solver.__solver(f, g) auto_solver.send(res)
def autosolve(): load_dotenv() mml = MATHML() task = 1 auto_solver = AutoSolver(config.BATTLE_3_EXTENSION, task) while True: div = auto_solver.start() math_elements = div.find_all('math') f = sympify(mml.parse(math_elements[1])) splits = str(div.p).split('[')[-1].split(']')[0].split(',') print(splits) a, b = [sympify(sanitize_input(i)) for i in splits] res = Solver.__solver(f, a, b) auto_solver.send(res)
def autosolve(): raise NotImplementedError('Currently working on') load_dotenv() mml = MATHML() task = 2 auto_solver = AutoSolver(config.BATTLE_1_EXTENSION, task) while True: div = auto_solver.start() math_elements = div.find_all('math') f = sympify(mml.parse(math_elements[1])) g = sympify(mml.parse(math_elements[3])) p = div.find_all('p')[1].text # TODO: I don't want res = Solver.__solver(f, g) auto_solver.send(res)
def autosolve(): raise NotImplementedError("Not implemented yet") load_dotenv() mml = MATHML() task = 2 auto_solver = AutoSolver(config.BATTLE_3_EXTENSION, task) while True: div = auto_solver.start() math_elements = div.find_all('math') f = sympify(mml.parse(math_elements[1])) a, b = [ sympify(sanitize_input(i)) for i in div.p.split('[')[-1].split(']')[0].split(',') ] res = Solver.__solver(f, a, b) auto_solver.send(res)
def __init__(self, battle_url_extension: str, task: int): self.__mml = MATHML() self.__driver = get_webdriver() self.__bue = battle_url_extension self.__task = task self.__login()