added no sandbox argument and updated chromedriver path
parent
a5283be5f9
commit
5f501bfe5d
3
main.py
3
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"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue