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 #!/usr/bin/python3
import random import random
import subprocess
from modules.Classes.Config import Config from modules.Classes.Config import Config
from modules.Classes.DiscordLogger import DiscordLogger from modules.Classes.DiscordLogger import DiscordLogger
@ -793,40 +794,40 @@ def json_start(json_entry, cred: UserCredentials):
login() login()
except KeyError: except KeyError:
login() login()
try:
if str(account_id) in json_entry["tout"]:
daily_routine(cred, True)
except KeyError:
pass
else:
try: try:
if str(account_id) in json_entry["tout"]: if str(account_id) in json_entry["daily"]:
daily_routine(cred, True) try:
all_cards()
except Exception as e:
log_error(e)
except KeyError: except KeyError:
pass pass
else: try:
try: if str(account_id) in json_entry["pc"]:
if str(account_id) in json_entry["daily"]: try:
try: bing_pc_search()
all_cards() except Exception as e:
except Exception as e: log_error(e)
log_error(e) except KeyError:
except KeyError: pass
pass try:
try: if str(account_id) in json_entry["mobile"]:
if str(account_id) in json_entry["pc"]: try:
try: bing_mobile_search(cred)
bing_pc_search() except Exception as e:
except Exception as e: log_error(e)
log_error(e) except KeyError:
except KeyError: pass
pass try:
try: log_points()
if str(account_id) in json_entry["mobile"]: except Exception as e:
try: error(f"CustomStart {e}")
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() driver.close()
cred.next_account() cred.next_account()
account_id += 1 account_id += 1
@ -843,13 +844,16 @@ def default_start():
while config.UserCredentials.is_valid(): while config.UserCredentials.is_valid():
custom_sleep(1) custom_sleep(1)
info("Starting and configuring driver.") 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") config.WebDriver.switch_to_driver("PC")
info("Driver started.") info("Driver started.")
config.WebDriver.pc_driver.implicitly_wait(3) config.WebDriver.pc_driver.implicitly_wait(3)
try: try:
wait_time = uniform(1200, 3600) 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") info(f"Waiting for {round(wait_time / 60)}min before starting")
custom_sleep(wait_time) custom_sleep(wait_time)
daily_routine(config.UserCredentials) daily_routine(config.UserCredentials)

View File

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