Skip to content

Commit

Permalink
Update auto-update.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Helias authored Nov 3, 2024
1 parent af016bb commit 341d06b
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion setup/auto-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,35 @@
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.common.by import By
import chromedriver_autoinstaller
from pyvirtualdisplay import Display
import os
import sys

display = Display(visible=0, size=(800, 800))
display.start()

chromedriver_autoinstaller.install() # Check if the current version of chromedriver exists
# and if it doesn't exist, download it automatically,
# then add chromedriver to path

chrome_options = webdriver.ChromeOptions()
options = [
"--window-size=1200,1200",
"--ignore-certificate-errors"
#"--headless",
#"--disable-gpu",
#"--window-size=1920,1200",
#"--ignore-certificate-errors",
#"--disable-extensions",
#"--no-sandbox",
#"--disable-dev-shm-usage",
#'--remote-debugging-port=9222'
]

for option in options:
chrome_options.add_argument(option)

password = sys.argv[1]

def wait_until(value, byval=By.ID) -> None:
Expand All @@ -18,7 +44,7 @@ def wait_until(value, byval=By.ID) -> None:
except TimeoutException:
print("error connection")

driver = webdriver.Chrome()
driver = webdriver.Chrome(options=chrome_options)

driver.get("https://aa.altervista.org/index.php?client_id=altervista&response_type=code&lang=it&redirect_uri=http%3A%2F%2Fit.altervista.org%2Fcplogin.php")

Expand Down

0 comments on commit 341d06b

Please sign in to comment.