mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-19 23:14:25 +01:00
Fix browse_website headless mode for Firefox (#2816)
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
This commit is contained in:
@@ -78,6 +78,9 @@ def scrape_text_with_selenium(url: str) -> tuple[WebDriver, str]:
|
||||
)
|
||||
|
||||
if CFG.selenium_web_browser == "firefox":
|
||||
if CFG.selenium_headless:
|
||||
options.headless = True
|
||||
options.add_argument("--disable-gpu")
|
||||
driver = webdriver.Firefox(
|
||||
executable_path=GeckoDriverManager().install(), options=options
|
||||
)
|
||||
@@ -92,7 +95,7 @@ def scrape_text_with_selenium(url: str) -> tuple[WebDriver, str]:
|
||||
|
||||
options.add_argument("--no-sandbox")
|
||||
if CFG.selenium_headless:
|
||||
options.add_argument("--headless")
|
||||
options.add_argument("--headless=new")
|
||||
options.add_argument("--disable-gpu")
|
||||
|
||||
chromium_driver_path = Path("/usr/bin/chromedriver")
|
||||
|
||||
Reference in New Issue
Block a user