Make chrome browser headless when checking the site with selenium (#3095)

This commit is contained in:
Tim3141
2025-04-09 10:09:20 +03:00
committed by GitHub
parent 2c630e9853
commit 0e38a3c881

View File

@@ -65,6 +65,7 @@ class fetcher(Fetcher):
# request_body, request_method unused for now, until some magic in the future happens.
options = ChromeOptions()
options.add_argument("--headless")
if self.proxy:
options.proxy = self.proxy
@@ -117,4 +118,4 @@ class fetcher(Fetcher):
try:
self.driver.quit()
except Exception as e:
logger.debug(f"Content Fetcher > Exception in chrome shutdown/quit {str(e)}")
logger.debug(f"Content Fetcher > Exception in chrome shutdown/quit {str(e)}")