From 6659c870b8a6063312e5a4561968b7bc512c50c0 Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Sun, 19 Mar 2023 22:14:09 +0100 Subject: [PATCH] added no-sandbox switch if run by root, added no-first-run if chrome was never used before --- honeygaingift.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/honeygaingift.py b/honeygaingift.py index 8795304..607367a 100644 --- a/honeygaingift.py +++ b/honeygaingift.py @@ -49,8 +49,10 @@ chrome_options = webdriver.ChromeOptions() # Verhindert das der Chromedriver log angezeigt wird. chrome_options.add_experimental_option('excludeSwitches', ['enable-logging']) chrome_options.binary_location = chrome_binary +chrome_options.add_argument('--no-first-run') +chrome_options.add_argument('--no-sandbox') # Öffnet den Chrome im Headless modus (Ohne Fenster) -#chrome_options.add_argument('--headless') +chrome_options.add_argument('--headless') # Erstelle eine Session mit Chrome und den vorher definierten Einstellungen driver = webdriver.Chrome(options=chrome_options) @@ -176,3 +178,5 @@ except TimeoutException: except TimeoutException: print("The 'Open Lucky Pot' button was not found within 10 seconds. Exiting...") + +driver.quit() \ No newline at end of file