added no sandbox argument and updated chromedriver path

master
alex 2022-06-30 21:12:50 +02:00
parent a5283be5f9
commit 5f501bfe5d
1 changed files with 2 additions and 1 deletions

View File

@ -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"))