From 47b50b4827121ec68d9e52a018b631a4a3f09625 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 27 Jan 2024 02:00:44 +0100 Subject: Fix PerplexityLabs Provider, Improve bypass_cloudflare helper --- g4f/Provider/selenium/AItianhuSpace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g4f/Provider/selenium/AItianhuSpace.py') diff --git a/g4f/Provider/selenium/AItianhuSpace.py b/g4f/Provider/selenium/AItianhuSpace.py index 6af8ceaf..4c438e3b 100644 --- a/g4f/Provider/selenium/AItianhuSpace.py +++ b/g4f/Provider/selenium/AItianhuSpace.py @@ -52,9 +52,9 @@ class AItianhuSpace(AbstractProvider): wait.until(EC.visibility_of_element_located((By.ID, "sheet"))) driver.execute_script(f""" document.getElementById('sheet').addEventListener('click', () => {{ - window.open('{url}', '_blank'); + window.open(arguments[0]); }}); - """) + """, url) driver.find_element(By.ID, "sheet").click() time.sleep(10) -- cgit v1.2.3