summaryrefslogtreecommitdiffstats
path: root/g4f/webdriver.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-12 18:45:22 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-12 18:45:22 +0100
commit5bcf21f9bd2dd9ea581e5301113facda6fc28426 (patch)
treeee3bd34f1e061c80576d8a34cb2bf0033f80a4ac /g4f/webdriver.py
parentFix unit test with missing requirements (diff)
downloadgpt4free-5bcf21f9bd2dd9ea581e5301113facda6fc28426.tar
gpt4free-5bcf21f9bd2dd9ea581e5301113facda6fc28426.tar.gz
gpt4free-5bcf21f9bd2dd9ea581e5301113facda6fc28426.tar.bz2
gpt4free-5bcf21f9bd2dd9ea581e5301113facda6fc28426.tar.lz
gpt4free-5bcf21f9bd2dd9ea581e5301113facda6fc28426.tar.xz
gpt4free-5bcf21f9bd2dd9ea581e5301113facda6fc28426.tar.zst
gpt4free-5bcf21f9bd2dd9ea581e5301113facda6fc28426.zip
Diffstat (limited to '')
-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