From 5b869283749b444c27fd077b0ae6ae3a9e2197e9 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 6 Jan 2022 02:32:37 +0100 Subject: [PATCH] Don't run headless in debug mode How else are users supposed to see what's going on? --- audible-activator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audible-activator.py b/audible-activator.py index 4443f37..0d6dab5 100755 --- a/audible-activator.py +++ b/audible-activator.py @@ -30,9 +30,10 @@ def fetch_activation_bytes(username, password, options): # Step 0 opts = webdriver.ChromeOptions() opts.add_argument("user-agent=Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko") - opts.add_argument('--headless') opts.add_argument('--no-sandbox') opts.add_argument('--disable-dev-shm-usage') + if not options.debug: + opts.add_argument('--headless') # Step 1 if '@' in username: # Amazon login using email address