the optimisation wasn't that great

This commit is contained in:
piair 2024-02-27 16:26:29 +01:00
parent d49742646c
commit 5ca91a7075
2 changed files with 6 additions and 7 deletions

11
V6.py
View File

@ -338,11 +338,6 @@ def try_play(nom="inconnu"):
debug("Poll detected")
do_poll()
elif "rqQuestionState" in driver.page_source:
number = driver.page_source.count("rqAnswerOption")
warning(f"recovery détecté. quiz : {number}")
play(number - 1)
elif search("([0-9]) de ([0-9]) finalisée", driver.page_source):
info("On fidelity page.")
fidelity()
@ -353,6 +348,11 @@ def try_play(nom="inconnu"):
answer_number = driver.page_source.count("rqAnswerOption")
play(answer_number)
elif "rqQuestionState" in driver.page_source:
number = driver.page_source.count("rqAnswerOption")
warning(f"recovery détecté. quiz : {number}")
play(number - 1)
else:
info(f"Nothing to do on page `{nom}`")
custom_sleep(uniform(3, 5))
@ -405,7 +405,6 @@ def login_part_2():
if get_domain(driver) == "account.microsoft.com":
break
try:
input(elm_id)
driver.find_element(By.ID, elm_id).click()
except Exception as e:
debug(e)

View File

@ -1 +1 @@
v6.8.19
v6.8.20