From 318304cca12d89fa8a48a281716ed2d375e69443 Mon Sep 17 00:00:00 2001 From: CHUN YU YAO Date: Wed, 8 Mar 2023 08:14:54 +0800 Subject: [PATCH] bugx fix for tixcraft --- chrome_tixcraft.py | 13 ++++++++++--- config_launcher.py | 2 +- settings.py | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/chrome_tixcraft.py b/chrome_tixcraft.py index 8a63ced..a7b7162 100644 --- a/chrome_tixcraft.py +++ b/chrome_tixcraft.py @@ -53,7 +53,7 @@ import argparse import ssl ssl._create_default_https_context = ssl._create_unverified_context -CONST_APP_VERSION = u"MaxBot (2023.03.07)" +CONST_APP_VERSION = u"MaxBot (2023.03.07).02" CONST_HOMEPAGE_DEFAULT = "https://tixcraft.com" URL_GOOGLE_OAUTH = 'https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount?redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground&prompt=consent&response_type=code&client_id=407408718192.apps.googleusercontent.com&scope=email&access_type=offline&flowName=GeneralOAuthFlow' @@ -1305,6 +1305,8 @@ def tixcraft_date_auto_select(driver, url, config_dict, domain_name): # read config. auto_select_mode = config_dict["tixcraft"]["date_auto_select"]["mode"] date_keyword = config_dict["tixcraft"]["date_auto_select"]["date_keyword"].strip() + # TODO: implement this feature. + date_keyword_and = "" pass_date_is_sold_out_enable = config_dict["tixcraft"]["pass_date_is_sold_out"] auto_reload_coming_soon_page_enable = config_dict["tixcraft"]["auto_reload_coming_soon_page"] @@ -8143,7 +8145,12 @@ def main(args): driver = None if not config_dict is None: - driver = get_driver_by_config(config_dict) + for i in range(50): + driver = get_driver_by_config(config_dict) + if not driver is None: + break + else: + time.sleep(0.05) else: print("Load config error!") @@ -8184,7 +8191,7 @@ def main(args): DISCONNECTED_MSG = ': target window already closed' while True: - time.sleep(0.1) + time.sleep(0.05) is_alert_popup = False diff --git a/config_launcher.py b/config_launcher.py index b261590..c6ed734 100644 --- a/config_launcher.py +++ b/config_launcher.py @@ -20,7 +20,7 @@ import json import webbrowser import base64 -CONST_APP_VERSION = u"MaxBot (2023.03.07)" +CONST_APP_VERSION = u"MaxBot (2023.03.07).02" CONST_LAUNCHER_CONFIG_FILENAME = "config_launcher.json" diff --git a/settings.py b/settings.py index 49422bf..49e7274 100644 --- a/settings.py +++ b/settings.py @@ -21,7 +21,7 @@ import webbrowser import pyperclip import base64 -CONST_APP_VERSION = u"MaxBot (2023.03.07)" +CONST_APP_VERSION = u"MaxBot (2023.03.07).02" CONST_SETTINGS_CONFIG_FILENAME = "settings.json"