feat : fast browser memory recovery

This commit is contained in:
martin legrand
2025-04-02 13:49:18 +02:00
parent aa75d276dc
commit f69ceb5025
3 changed files with 13 additions and 3 deletions
+5
View File
@@ -24,6 +24,9 @@ import re
from sources.utility import pretty_print, animate_thinking
logging.basicConfig(filename='browser.log', level=logging.ERROR,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
def get_chrome_path() -> str:
if sys.platform.startswith("win"):
paths = [
@@ -111,6 +114,8 @@ class Browser:
self.logger = logging.getLogger(__name__)
self.logger.info("Browser initialized successfully")
except Exception as e:
logging.basicConfig(filename='browser.log', level=logging.ERROR,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
raise Exception(f"Failed to initialize browser: {str(e)}")
self.driver.get("https://www.google.com")
if anticaptcha_manual_install: