summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Phind.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/Provider/Phind.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/g4f/Provider/Phind.py b/g4f/Provider/Phind.py
index 2612a92d..0cb17ddb 100644
--- a/g4f/Provider/Phind.py
+++ b/g4f/Provider/Phind.py
@@ -23,16 +23,10 @@ class Phind(BaseProvider):
timeout: int = 120,
browser: WebDriver = None,
creative_mode: bool = None,
- hidden_display: bool = True,
+ headless: bool = True,
**kwargs
) -> CreateResult:
- if browser:
- driver = browser
- else:
- if hidden_display:
- driver, display = get_browser("", True, proxy)
- else:
- driver = get_browser("", False, proxy)
+ driver = browser if browser else get_browser("", headless, proxy)
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
@@ -111,9 +105,7 @@ if(window.reader) {
else:
time.sleep(0.1)
finally:
- driver.close()
if not browser:
+ driver.close()
time.sleep(0.1)
- driver.quit()
- if hidden_display:
- display.stop() \ No newline at end of file
+ driver.quit() \ No newline at end of file