Browse Source

switched to chrome as browser

main
Markus Frank 2 weeks ago
parent
commit
54661883ff
  1. 12
      main.py

12
main.py

@ -1,10 +1,11 @@ @@ -1,10 +1,11 @@
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from datetime import datetime, timedelta
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.firefox.options import Options
import smtplib
import time
from dotenv import load_dotenv
@ -48,8 +49,11 @@ def check_date(due_date, recipient_email): @@ -48,8 +49,11 @@ def check_date(due_date, recipient_email):
def check_books(user, pw, recipient_email):
options = Options()
options.add_argument("--headless")
driver = webdriver.Firefox(options=options)
options.add_argument("--headless") # Run Chrome in headless mode
options.add_argument("--disable-gpu") # Disable GPU acceleration
options.add_argument("--no-sandbox") # Required for some environments
driver = webdriver.Chrome(options=options) # Use ChromeDriver
try:
# Navigate to the login page
driver.get("https://webserver.sv-radebeul.de/Mediensuche-Konto/Mein-Konto")

Loading…
Cancel
Save