summaryrefslogtreecommitdiffstats
path: root/g4f/webdriver.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-03-13 15:17:25 +0100
committerGitHub <noreply@github.com>2024-03-13 15:17:25 +0100
commit9c381f29060d697fe2d2c4768cd51b37d98ef3e0 (patch)
tree08a729476060f61f16ac8e909ed7dfe1cf4b2843 /g4f/webdriver.py
parentMerge pull request #1680 from Zero6992/main (diff)
parentUpdate Bing.py (diff)
downloadgpt4free-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.py5
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