From 012e923ab56c8d747bf7befce97fb3f00679a127 Mon Sep 17 00:00:00 2001 From: piair Date: Wed, 29 Mar 2023 23:19:57 +0200 Subject: [PATCH] better stronger (no) --- V5.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/V5.py b/V5.py index a662772..aa989e8 100755 --- a/V5.py +++ b/V5.py @@ -471,18 +471,18 @@ def login(ldriver): ldriver.refresh() rgpd_popup(ldriver) ldriver.get("https://www.bing.com/rewardsapp/flyout") - if not('class="b_subtitle bt_join"' in ldriver.page_source): + if not('>Tableau de bord' in ldriver.page_source): log_error(f"Not Connected 1. autre tag : {'>Tableau de bord' in ldriver.page_source}", ldriver, True) ldriver.refresh() log_error("Not Connected 2", ldriver, True) - if not('class="b_subtitle bt_join"' in ldriver.page_source): + if not('>Tableau de bord' in ldriver.page_source): log_error("Not connected 3", ldriver, True) try : driver.find_element(By.CSS_SELECTOR, "[h='ID=RewardsFlyout,2.1']").click() log_error("not connected 5", ldriver, True) except Exception as e: log_error(f"not connected 5 - error {e}", ldriver) - if not('class="b_subtitle bt_join"' in ldriver.page_source): + if not('>Tableau de bord' in ldriver.page_source): try : driver.find_element(By.XPATH, "/html/body/div/div/div/div/div[2]/a").click() except Exception as e: