diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2023-11-16 18:35:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-16 18:35:22 +0100 |
commit | 51a666921093f395778621777152cb829d895ea2 (patch) | |
tree | 93956238d8dac11bf64868974231b3f1557c123c /g4f/Provider | |
parent | Update helper.py (diff) | |
download | gpt4free-51a666921093f395778621777152cb829d895ea2.tar gpt4free-51a666921093f395778621777152cb829d895ea2.tar.gz gpt4free-51a666921093f395778621777152cb829d895ea2.tar.bz2 gpt4free-51a666921093f395778621777152cb829d895ea2.tar.lz gpt4free-51a666921093f395778621777152cb829d895ea2.tar.xz gpt4free-51a666921093f395778621777152cb829d895ea2.tar.zst gpt4free-51a666921093f395778621777152cb829d895ea2.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/Phind.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/g4f/Provider/Phind.py b/g4f/Provider/Phind.py index 56100d87..1499fcb2 100644 --- a/g4f/Provider/Phind.py +++ b/g4f/Provider/Phind.py @@ -2,15 +2,10 @@ from __future__ import annotations import time from urllib.parse import quote -try: - from selenium.webdriver.remote.webdriver import WebDriver -except ImportError: - class WebDriver(): - pass from ..typing import CreateResult, Messages from .base_provider import BaseProvider -from .helper import format_prompt, get_browser +from .helper import WebDriver, format_prompt, get_browser class Phind(BaseProvider): url = "https://www.phind.com" @@ -28,7 +23,7 @@ class Phind(BaseProvider): timeout: int = 120, browser: WebDriver = None, creative_mode: bool = None, - display: bool = True, + hidden_display: bool = True, **kwargs ) -> CreateResult: from selenium.webdriver.common.by import By @@ -38,7 +33,7 @@ class Phind(BaseProvider): if browser: driver = browser else: - if display: + if hidden_display: driver, display = get_browser("", True, proxy) else: driver = get_browser("", False, proxy) @@ -112,5 +107,5 @@ if(window.reader) { if not browser: time.sleep(0.1) driver.quit() - if display: + if hidden_display: display.stop()
\ No newline at end of file |