mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 19:15:28 +00:00
Update browser.py
update the code to remove overhead of check and install chromedriver.
This commit is contained in:
parent
d12b345fe8
commit
07a04b069e
@ -8,7 +8,6 @@ from selenium.common.exceptions import TimeoutException, WebDriverException
|
|||||||
import chromedriver_autoinstaller
|
import chromedriver_autoinstaller
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
import shutil
|
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
import markdownify
|
import markdownify
|
||||||
import logging
|
import logging
|
||||||
@ -38,10 +37,8 @@ class Browser:
|
|||||||
chrome_options.add_argument("--no-sandbox")
|
chrome_options.add_argument("--no-sandbox")
|
||||||
chrome_options.add_argument("--disable-dev-shm-usage")
|
chrome_options.add_argument("--disable-dev-shm-usage")
|
||||||
|
|
||||||
# Automatically find ChromeDriver path
|
# Automatically install or find ChromeDriver path.
|
||||||
chromedriver_autoinstaller.install()
|
chromedriver_path = chromedriver_autoinstaller.install()
|
||||||
# Automatically find ChromeDriver path
|
|
||||||
chromedriver_path = shutil.which("chromedriver")
|
|
||||||
if not chromedriver_path:
|
if not chromedriver_path:
|
||||||
raise FileNotFoundError("ChromeDriver not found. Please install it or add it to your PATH.")
|
raise FileNotFoundError("ChromeDriver not found. Please install it or add it to your PATH.")
|
||||||
service = Service(chromedriver_path)
|
service = Service(chromedriver_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user