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

70
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
@ -793,40 +794,40 @@ def json_start(json_entry, cred: UserCredentials):
login()
except KeyError:
login()
try:
if str(account_id) in json_entry["tout"]:
daily_routine(cred, True)
except KeyError:
pass
else:
try:
if str(account_id) in json_entry["tout"]:
daily_routine(cred, True)
if str(account_id) in json_entry["daily"]:
try:
all_cards()
except Exception as e:
log_error(e)
except KeyError:
pass
else:
try:
if str(account_id) in json_entry["daily"]:
try:
all_cards()
except Exception as e:
log_error(e)
except KeyError:
pass
try:
if str(account_id) in json_entry["pc"]:
try:
bing_pc_search()
except Exception as e:
log_error(e)
except KeyError:
pass
try:
if str(account_id) in json_entry["mobile"]:
try:
bing_mobile_search(cred)
except Exception as e:
log_error(e)
except KeyError:
pass
try:
log_points()
except Exception as e:
error(f"CustomStart {e}")
try:
if str(account_id) in json_entry["pc"]:
try:
bing_pc_search()
except Exception as e:
log_error(e)
except KeyError:
pass
try:
if str(account_id) in json_entry["mobile"]:
try:
bing_mobile_search(cred)
except Exception as e:
log_error(e)
except KeyError:
pass
try:
log_points()
except Exception as e:
error(f"CustomStart {e}")
driver.close()
cred.next_account()
account_id += 1
@ -843,13 +844,16 @@ def default_start():
while config.UserCredentials.is_valid():
custom_sleep(1)
info("Starting and configuring driver.")
config.WebDriver.set_pc_driver(create_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