From b51171cd56648d488078bb8e3a1deafd8e4e29d0 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 29 Mar 2024 18:44:03 +0800 Subject: [PATCH] 2024-03-14 --- chrome_tixcraft.py | 34 +++++++++++++++++----------------- config_launcher.py | 2 +- kktix_signout.py | 2 +- kktix_status.py | 2 +- settings.py | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/chrome_tixcraft.py b/chrome_tixcraft.py index 8fec6c4..3859126 100644 --- a/chrome_tixcraft.py +++ b/chrome_tixcraft.py @@ -44,7 +44,7 @@ try: except Exception as exc: pass -CONST_APP_VERSION = "MaxBot (2024.03.13)" +CONST_APP_VERSION = "MaxBot (2024.03.14)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" @@ -7961,23 +7961,22 @@ def kktix_main(driver, url, config_dict, kktix_dict): if not kktix_dict["played_sound_order"]: play_sound_while_ordering(config_dict) - if not kktix_dict["played_sound_order"]: - kktix_account = config_dict["advanced"]["kktix_account"] - kktix_password = config_dict["advanced"]["kktix_password_plaintext"].strip() - if kktix_password == "": - kktix_password = decryptMe(config_dict["advanced"]["kktix_password"]) - - print("基本資料(或實名制)網址:", url) - if len(kktix_account) > 0: - print("搶票成功, 帳號:", kktix_account) - threading.Thread(target=launch_maxbot, args=("", url, kktix_account, kktix_password, "false", )).start() - driver.quit() - sys.exit() - kktix_dict["played_sound_order"] = True if config_dict["advanced"]["headless"]: if not kktix_dict["is_popup_checkout"]: + kktix_account = config_dict["advanced"]["kktix_account"] + kktix_password = config_dict["advanced"]["kktix_password_plaintext"].strip() + if kktix_password == "": + kktix_password = decryptMe(config_dict["advanced"]["kktix_password"]) + + print("基本資料(或實名制)網址:", url) + if len(kktix_account) > 0: + print("搶票成功, 帳號:", kktix_account) + threading.Thread(target=launch_maxbot, args=("", url, kktix_account, kktix_password, "false", )).start() + #driver.quit() + #sys.exit() + is_event_page = False if len(url.split('/'))>=7: is_event_page = True @@ -7988,9 +7987,10 @@ def kktix_main(driver, url, config_dict, kktix_dict): checkout_url = "https://%s/account/orders" % (domain_name) print("搶票成功, 請前往該帳號訂單查看: %s" % (checkout_url)) webbrowser.open_new(checkout_url) - kktix_dict["is_popup_checkout"] = True - driver.quit() - sys.exit() + + kktix_dict["is_popup_checkout"] = True + driver.quit() + sys.exit() else: kktix_dict["is_popup_checkout"] = False kktix_dict["played_sound_order"] = False diff --git a/config_launcher.py b/config_launcher.py index 7652ccb..b059f68 100644 --- a/config_launcher.py +++ b/config_launcher.py @@ -23,7 +23,7 @@ import sys import threading import webbrowser -CONST_APP_VERSION = "MaxBot (2024.03.13)" +CONST_APP_VERSION = "MaxBot (2024.03.14)" CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json" CONST_MAXBOT_CONFIG_FILE = "settings.json" diff --git a/kktix_signout.py b/kktix_signout.py index 530ab62..e763696 100644 --- a/kktix_signout.py +++ b/kktix_signout.py @@ -11,7 +11,7 @@ import requests import asyncio import nodriver as uc -CONST_APP_VERSION = "MaxBot (2024.03.13)" +CONST_APP_VERSION = "MaxBot (2024.03.14)" CONST_MAXBOT_CONFIG_FILE = "settings.json" USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" diff --git a/kktix_status.py b/kktix_status.py index 87b8054..686441b 100644 --- a/kktix_status.py +++ b/kktix_status.py @@ -29,7 +29,7 @@ from datetime import datetime import requests -CONST_APP_VERSION = "MaxBot (2024.03.13)" +CONST_APP_VERSION = "MaxBot (2024.03.14)" CONST_MAXBOT_CONFIG_FILE = "settings.json" CONST_MAXBOT_KKTIX_CONFIG_FILE = "kktix.json" diff --git a/settings.py b/settings.py index aeebb81..a5b27ee 100644 --- a/settings.py +++ b/settings.py @@ -50,7 +50,7 @@ try: except Exception as exc: pass -CONST_APP_VERSION = "MaxBot (2024.03.13)" +CONST_APP_VERSION = "MaxBot (2024.03.14)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json"