Don't run headless in debug mode

How else are users supposed to see what's going on?
This commit is contained in:
Niklas Haas 2022-01-06 02:32:37 +01:00
parent 79e2cea3ca
commit 5b86928374

View File

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