From e519ba2433538ab724cadf963aca863a606eefd4 Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Fri, 7 Mar 2025 16:40:34 +0000 Subject: [PATCH] Add 'reject all' cookie button --- src/auto_archiver/utils/webdriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auto_archiver/utils/webdriver.py b/src/auto_archiver/utils/webdriver.py index 1d01df2..cb4e2a9 100644 --- a/src/auto_archiver/utils/webdriver.py +++ b/src/auto_archiver/utils/webdriver.py @@ -89,7 +89,7 @@ class CookieSettingDriver(webdriver.Firefox): else: # for all other sites, try and use some common button text to reject/accept cookies - for text in ["Refuse non-essential cookies", "Decline optional cookies", "Reject additional cookies", "Accept all cookies"]: + for text in ["Refuse non-essential cookies", "Decline optional cookies", "Reject additional cookies", "Reject all", "Accept all cookies"]: try: xpath = f"//*[contains(translate(text(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), '{text.lower()}')]" WebDriverWait(self, 5).until(EC.element_to_be_clickable((By.XPATH, xpath))).click()