trying to auto update chrome + fixed web override ?

This commit is contained in:
piair 2024-04-26 15:51:52 +02:00
parent 27d45e88dd
commit 3123a1dbd0
2 changed files with 38 additions and 34 deletions

6
V6.py
View File

@ -1,5 +1,6 @@
#!/usr/bin/python3
import random
import subprocess
from modules.Classes.Config import Config
from modules.Classes.DiscordLogger import DiscordLogger
@ -843,13 +844,16 @@ def default_start():
while config.UserCredentials.is_valid():
custom_sleep(1)
info("Starting and configuring driver.")
try:
config.WebDriver.set_pc_driver(create_driver())
except:
subprocess.Popen(["python3", "/app/MsRewards-Reborn/modules/Tools/update_chrome.py"])
config.WebDriver.set_pc_driver(create_driver())
config.WebDriver.switch_to_driver("PC")
info("Driver started.")
config.WebDriver.pc_driver.implicitly_wait(3)
try:
wait_time = uniform(1200, 3600)
wait_time = 10 # the display closes when I ctrl + c
info(f"Waiting for {round(wait_time / 60)}min before starting")
custom_sleep(wait_time)
daily_routine(config.UserCredentials)

View File

@ -1 +1 @@
v6.8.50
v6.8.51