From d49742646c5fe6416bfe802cdd53a1b17c62db1b Mon Sep 17 00:00:00 2001 From: piair Date: Tue, 27 Feb 2024 16:21:08 +0100 Subject: [PATCH] wrong parameter in rgpd_popup --- V6.py | 11 ++++++----- modules/driver_tools.py | 5 +++-- version | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/V6.py b/V6.py index c3143da..f6e17f8 100755 --- a/V6.py +++ b/V6.py @@ -2,7 +2,7 @@ from modules.Classes.Config import Config from modules.Classes.DiscordLogger import DiscordLogger from modules.Classes.UserCredentials import UserCredentials -from modules.Tools.logger import warning, debug, critical +from modules.Tools.logger import warning, critical from modules.cards import * from modules.config import * from modules.db import add_to_database @@ -111,11 +111,12 @@ def play_quiz8(): answer_elem = driver.find_element(By.ID, answer_id) answer_elem.click() except ElementClickInterceptedException: - rgpd_popup(driver) + rgpd_popup(config) correct_answers.append(answer_id) except Exception as e: log_error(f"{format_error(e)} \n Good answers : {' '.join(correct_answers)}") + raise ValueError(format_error(e)) info("Quiz 8 done.") custom_sleep(3) @@ -297,7 +298,7 @@ def promo(): # Find out which type of action to do def try_play(nom="inconnu"): driver = config.WebDriver.driver - rgpd_popup(driver) + rgpd_popup(config) def play(number): if number in [8, 9]: @@ -329,7 +330,7 @@ def try_play(nom="inconnu"): custom_sleep(5) driver.find_element(By.CSS_SELECTOR, '[onclick="setsrchusr()"]').click() custom_sleep(5) - rgpd_popup(driver) + rgpd_popup(config) custom_sleep(5) debug("Detected and fixed connection popup") @@ -436,7 +437,7 @@ def bing_pc_search(override=randint(35, 40)): driver = config.WebDriver.driver driver.get(f"https://www.bing.com/search?q={config.wordlist.get_word().replace(' ', '+')}") custom_sleep(uniform(1, 2)) - rgpd_popup(driver) + rgpd_popup(config) send_keys_wait( driver.find_element(By.ID, "sb_form_q"), Keys.BACKSPACE + Keys.BACKSPACE + Keys.BACKSPACE + Keys.BACKSPACE + Keys.BACKSPACE + Keys.BACKSPACE diff --git a/modules/driver_tools.py b/modules/driver_tools.py index b937671..6208f58 100644 --- a/modules/driver_tools.py +++ b/modules/driver_tools.py @@ -6,6 +6,7 @@ from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from selenium.webdriver.support.wait import WebDriverWait +from modules.Tools.logger import debug from modules.Tools.tools import * @@ -43,8 +44,8 @@ def rgpd_popup(config) -> None: for i in ["bnp_btn_accept", "bnp_hfly_cta2", "bnp_hfly_close"]: try: config.WebDriver.driver.find_element(By.ID, i).click() - except: - pass + except Exception as err: + debug(err) """ diff --git a/version b/version index efa0813..19f490d 100644 --- a/version +++ b/version @@ -1 +1 @@ -v6.8.18 +v6.8.19