feat : improve chrome path check + no query refusal on complex task

This commit is contained in:
martin legrand
2025-04-16 13:59:11 +02:00
parent 4342677344
commit a3ca718131
3 changed files with 21 additions and 20 deletions
+5
View File
@@ -44,6 +44,11 @@ def get_chrome_path() -> str:
for path in paths:
if os.path.exists(path) and os.access(path, os.X_OK): # Check if executable
return path
print("Looking for Google Chrome in these locations failed:")
print('\n'.join(paths))
path = input("Google Chrome not found. Please enter the path to the Chrome executable: ")
if os.path.exists(path) and os.access(path, os.X_OK):
return path
return None
def create_driver(headless=False, stealth_mode=True, crx_path="./crx/nopecha.crx") -> webdriver.Chrome: