This commit is contained in:
piair 2022-06-10 12:39:18 +02:00
parent bcb7511ecf
commit a9bd8ecf9b

26
V4.py
View File

@ -658,38 +658,38 @@ def BingMobileSearch(override=randint(22, 25)):
printf("debut du login", Mobdriver=MobileDriver) printf("debut du login", Mobdriver=MobileDriver)
MobileDriver.find_element(By.ID, "mHamburger").click() MobileDriver.find_element(By.ID, "mHamburger").click()
CustomSleep(uniform(1, 2)) CustomSleep(uniform(1, 2))
printf("login - 1", Mobdriver=MobileDriver) printf("Mlogin - 1", Mobdriver=MobileDriver)
MobileDriver.find_element(By.ID, "hb_s").click() MobileDriver.find_element(By.ID, "hb_s").click()
CustomSleep(uniform(1, 2)) CustomSleep(uniform(1, 2))
printf("login - 2", Mobdriver=MobileDriver) printf("Mlogin - 2", Mobdriver=MobileDriver)
mail = MobileDriver.find_element(By.ID, "i0116") mail = MobileDriver.find_element(By.ID, "i0116")
send_keys_wait(mail, _mail) send_keys_wait(mail, _mail)
printf("login - 3", Mobdriver=MobileDriver) printf("Mlogin - 3", Mobdriver=MobileDriver)
mail.send_keys(Keys.ENTER) mail.send_keys(Keys.ENTER)
CustomSleep(uniform(7, 9)) CustomSleep(uniform(7, 9))
printf("login - 4", Mobdriver=MobileDriver) printf("Mlogin - 4", Mobdriver=MobileDriver)
pwd = MobileDriver.find_element(By.ID, "i0118") pwd = MobileDriver.find_element(By.ID, "i0118")
printf("login - 5", Mobdriver=MobileDriver) printf("Mlogin - 5", Mobdriver=MobileDriver)
send_keys_wait(pwd, _password) send_keys_wait(pwd, _password)
printf("login - 6", Mobdriver=MobileDriver) printf("Mlogin - 6", Mobdriver=MobileDriver)
pwd.send_keys(Keys.ENTER) pwd.send_keys(Keys.ENTER)
CustomSleep(uniform(1, 2)) CustomSleep(uniform(1, 2))
try: try:
MobileDriver.find_element(By.ID, "KmsiCheckboxField").click() MobileDriver.find_element(By.ID, "KmsiCheckboxField").click()
except Exception as e: except Exception as e:
printf(f"login - 1 - erreur validation bouton KmsiCheckboxField. pas forcement grave {e}") printf(f"Mlogin - 2.1 - erreur validation bouton KmsiCheckboxField. pas forcement grave {e}")
try: try:
MobileDriver.find_element(By.ID, "iLooksGood").click() MobileDriver.find_element(By.ID, "iLooksGood").click()
except Exception as e: except Exception as e:
printf(f"login - 2 - erreur validation bouton iLooksGood. pas forcement grave {e}") printf(f"Mlogin - 2.2 - erreur validation bouton iLooksGood. pas forcement grave {e}")
try: try:
MobileDriver.find_element(By.ID, "idSIButton9").click() MobileDriver.find_element(By.ID, "idSIButton9").click()
except Exception as e: except Exception as e:
printf(f"login - 2 - erreur validation bouton idSIButton9. pas forcement grave {e}") printf(f"Mlogin - 2.3 - erreur validation bouton idSIButton9. pas forcement grave {e}")
printf("fin du login", Mobdriver=MobileDriver) printf("fin du Mlogin", Mobdriver=MobileDriver)
except Exception as e: except Exception as e:
echec += 1 echec += 1
@ -710,11 +710,13 @@ def BingMobileSearch(override=randint(22, 25)):
try: try:
MobileDriver.find_element(By.ID, "bnp_btn_accept").click() MobileDriver.find_element(By.ID, "bnp_btn_accept").click()
except Exception as e: except Exception as e:
pass
printf(e) printf(e)
try: try:
MobileDriver.find_element(By.ID, "bnp_hfly_cta2").click() MobileDriver.find_element(By.ID, "bnp_hfly_cta2").click()
except Exception as e: except Exception as e:
printf(e) pass
printf(f"MRGPD : e")
def Alerte(): def Alerte():
try: try:
@ -753,7 +755,7 @@ def BingMobileSearch(override=randint(22, 25)):
MobileDriver.quit() MobileDriver.quit()
except Exception as e: except Exception as e:
LogError("BingMobileSearch" + str(e), Mobdriver=MobileDriver) LogError("BingMobileSearch - 4 - " + str(e), Mobdriver=MobileDriver)
try: try:
MobileDriver.quit() MobileDriver.quit()
except Exception as e: except Exception as e: