diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-03-13 15:17:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-13 15:17:25 +0100 |
commit | 9c381f29060d697fe2d2c4768cd51b37d98ef3e0 (patch) | |
tree | 08a729476060f61f16ac8e909ed7dfe1cf4b2843 /g4f/webdriver.py | |
parent | Merge pull request #1680 from Zero6992/main (diff) | |
parent | Update Bing.py (diff) | |
download | gpt4free-9c381f29060d697fe2d2c4768cd51b37d98ef3e0.tar gpt4free-9c381f29060d697fe2d2c4768cd51b37d98ef3e0.tar.gz gpt4free-9c381f29060d697fe2d2c4768cd51b37d98ef3e0.tar.bz2 gpt4free-9c381f29060d697fe2d2c4768cd51b37d98ef3e0.tar.lz gpt4free-9c381f29060d697fe2d2c4768cd51b37d98ef3e0.tar.xz gpt4free-9c381f29060d697fe2d2c4768cd51b37d98ef3e0.tar.zst gpt4free-9c381f29060d697fe2d2c4768cd51b37d98ef3e0.zip |
Diffstat (limited to 'g4f/webdriver.py')
-rw-r--r-- | g4f/webdriver.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/g4f/webdriver.py b/g4f/webdriver.py index 21dbc469..2b7a7241 100644 --- a/g4f/webdriver.py +++ b/g4f/webdriver.py @@ -10,10 +10,9 @@ try: from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException - from undetected_chromedriver import Chrome, ChromeOptions has_requirements = True except ImportError: - from typing import Type as WebDriver, Callable as user_config_dir + from typing import Type as WebDriver has_requirements = False import time @@ -38,9 +37,9 @@ try: def __init__(self, *args, options=None, seleniumwire_options={}, **kwargs): if options is None: options = ChromeOptions() - options.add_argument('--proxy-bypass-list=<-loopback>') config = self._setup_backend(seleniumwire_options) options.add_argument(f"--proxy-server={config['proxy']['httpProxy']}") + options.add_argument('--proxy-bypass-list=<-loopback>') options.add_argument("--ignore-certificate-errors") super().__init__(*args, options=options, **kwargs) has_seleniumwire = True |