From a9c2346c04f9c6bf7d15a18d8c4e43a396a869ef Mon Sep 17 00:00:00 2001 From: alpcentaur Date: Tue, 5 Mar 2024 14:50:34 +0000 Subject: [PATCH] first change to also click Accept Button in English if may come for js spidering functionality --- spiders/fdb_spider.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spiders/fdb_spider.py b/spiders/fdb_spider.py index 3ccb184..0a34ccd 100644 --- a/spiders/fdb_spider.py +++ b/spiders/fdb_spider.py @@ -174,6 +174,12 @@ class fdb_spider(object): except Exception as e: print(e, 'no cookies to accept..') pass + try: + accept_button = driver.find_element("xpath","//button[contains(text(), 'Accept')]") + accept_button.click() + except Exception as e: + print(e, 'no cookies to accept..') + pass for i in range(len(entry_jsiteration_var_list)): time.sleep(1)