Browse Source

added private mode and adjusted user dir

main
Markus Frank 2 weeks ago
parent
commit
7f7aead83d
  1. 6
      main.py

6
main.py

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
import tempfile
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
@ -53,6 +55,10 @@ def check_books(user, pw, recipient_email): @@ -53,6 +55,10 @@ def check_books(user, pw, recipient_email):
options.add_argument("--disable-gpu") # Disable GPU acceleration
options.add_argument("--no-sandbox") # Required for some environments
options.add_argument("--incognito")
# Use a unique temporary user-data-dir
temp_dir = tempfile.mkdtemp()
options.add_argument(f"--user-data-dir={temp_dir}")
driver = webdriver.Chrome(options=options) # Use ChromeDriver
try:

Loading…
Cancel
Save