From 5f501bfe5d5aff961324393453c7b89dcf195b8f Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 30 Jun 2022 21:12:50 +0200 Subject: [PATCH] added no sandbox argument and updated chromedriver path --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 306b7f8..bb3a469 100755 --- a/main.py +++ b/main.py @@ -26,11 +26,12 @@ class Bot: options = webdriver.ChromeOptions() if os.environ.get("browserDebug") == "false": + options.add_argument('--no-sandbox') options.add_argument('--headless') options.add_argument('--disable-gpu') options.add_argument('--window-size=1920x1080') - self.driver = webdriver.Chrome(options=options, executable_path="./chromedriver") + self.driver = webdriver.Chrome(options=options, executable_path=os.path.dirname(os.path.realpath(__file__)) + "/chromedriver") self.driver.get(os.environ.get("schoolUrl"))