From 365df0abcdcd9b09673a62c280f45ad1027f26d8 Mon Sep 17 00:00:00 2001 From: piair Date: Fri, 27 May 2022 09:28:31 +0200 Subject: [PATCH] update mobile login --- V4.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/V4.py b/V4.py index 75dc2e3..11f4c0f 100755 --- a/V4.py +++ b/V4.py @@ -278,9 +278,7 @@ def Close(fenetre, SwitchTo=0): driver.switch_to.window(driver.window_handles[SwitchTo]) -""" -Deal with RGPD popup as well as some random popup like 'are you satisfied' one -""" +#Deal with RGPD popup as well as some random popup like 'are you satisfied' one def RGPD(): try: driver.find_element(By.ID, "bnp_btn_accept").click() @@ -634,6 +632,7 @@ def BingMobileSearch(override=randint(22, 25)): ) CustomSleep(uniform(3, 5)) printf("debut du login", Mobdriver=MobileDriver) + MRGPD() MobileDriver.find_element(By.ID, "mHamburger").click() CustomSleep(uniform(1, 2)) printf("login - 1", Mobdriver=MobileDriver) @@ -673,11 +672,15 @@ def BingMobileSearch(override=randint(22, 25)): try: MobileDriver.find_element(By.ID, "bnp_btn_accept").click() except Exception as e: - printf(e) + printf(f"MRGPD , pas grave, {e}") try: MobileDriver.find_element(By.ID, "bnp_hfly_cta2").click() except Exception as e: - printf(e) + printf(f"MRGPD , pas grave, {e}") + try: + MobileDriver.find_element(By.ID, "dismissNotification").click() + except Exception as e: + printf(f"MRGPD , pas grave, {e}") def Alerte(): try: