diff --git a/chrome_tixcraft.py b/chrome_tixcraft.py index 94918f4..45f8406 100644 --- a/chrome_tixcraft.py +++ b/chrome_tixcraft.py @@ -44,7 +44,7 @@ except Exception as exc: print(exc) pass -CONST_APP_VERSION = "MaxBot (2024.04.01)" +CONST_APP_VERSION = "MaxBot (2024.04.02)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" diff --git a/config_launcher.py b/config_launcher.py index 49dc143..e67b0d1 100644 --- a/config_launcher.py +++ b/config_launcher.py @@ -24,7 +24,7 @@ import webbrowser import util -CONST_APP_VERSION = "MaxBot (2024.04.01)" +CONST_APP_VERSION = "MaxBot (2024.04.02)" CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json" CONST_MAXBOT_CONFIG_FILE = "settings.json" diff --git a/kktix_status.py b/kktix_status.py index 32dc3c0..a1c7d20 100644 --- a/kktix_status.py +++ b/kktix_status.py @@ -29,7 +29,7 @@ from datetime import datetime import util -CONST_APP_VERSION = "MaxBot (2024.04.01)" +CONST_APP_VERSION = "MaxBot (2024.04.02)" CONST_MAXBOT_CONFIG_FILE = "settings.json" CONST_MAXBOT_KKTIX_CONFIG_FILE = "kktix.json" diff --git a/nodriver_tixcraft.py b/nodriver_tixcraft.py index c5b8e76..0879a93 100644 --- a/nodriver_tixcraft.py +++ b/nodriver_tixcraft.py @@ -32,7 +32,7 @@ except Exception as exc: print(exc) pass -CONST_APP_VERSION = "MaxBot (2024.04.01)" +CONST_APP_VERSION = "MaxBot (2024.04.02)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" @@ -1605,11 +1605,22 @@ async def nodriver_ibon_main(tab, url, config_dict, ibon_dict, ocr, Captcha_Brow return ibon_dict -async def nodriver_cityline_auto_retry_access(tab, url): +async def nodriver_cityline_auto_retry_access(tab, url, config_dict): try: + # https://event.cityline.com/utsvInternet/EVENT_NAME/home?lang=TW + if "home?lang=TW" in url: + url_array = url.split("home?lang=TW") + if len(url_array) > 2: + new_url = url_array[0] + "home?lang=TW" + print("redirect to url:", new_url) + tab = await tab.get(new_url) + time.sleep(0.1) + btn_retry = await tab.query_selector('button') if btn_retry: + #print("found button to click.") btn_retry.click() + time.sleep(0.1) except Exception as exc: print(exc) pass @@ -1785,7 +1796,7 @@ async def nodriver_cityline_close_second_tab(tab, url): async def nodriver_cityline_main(tab, url, config_dict): if 'msg.cityline.com' in url or 'event.cityline.com' in url: - await nodriver_cityline_auto_retry_access(tab, url) + await nodriver_cityline_auto_retry_access(tab, url, config_dict) if 'cityline.com/Login.html' in url: cityline_account = config_dict["advanced"]["cityline_account"] diff --git a/settings.py b/settings.py index 3cd83eb..27a5ff5 100644 --- a/settings.py +++ b/settings.py @@ -41,7 +41,7 @@ try: except Exception as exc: pass -CONST_APP_VERSION = "MaxBot (2024.04.01)" +CONST_APP_VERSION = "MaxBot (2024.04.02)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" diff --git a/webdriver/Maxbotplus_1.0.0/js/cityline_performance.js b/webdriver/Maxbotplus_1.0.0/js/cityline_performance.js index c42825d..ad1b13f 100644 --- a/webdriver/Maxbotplus_1.0.0/js/cityline_performance.js +++ b/webdriver/Maxbotplus_1.0.0/js/cityline_performance.js @@ -105,6 +105,7 @@ function cityline_performance() $('#expressPurchaseBtn').click(); } } + $("#commonWarningMessageModal").hide(); setTimeout(() => { cityline_performance() diff --git a/webdriver/Maxbotplus_1.0.0/manifest.json b/webdriver/Maxbotplus_1.0.0/manifest.json index d970e7b..bf341b4 100644 --- a/webdriver/Maxbotplus_1.0.0/manifest.json +++ b/webdriver/Maxbotplus_1.0.0/manifest.json @@ -320,7 +320,7 @@ }, { "matches": [ - "https://msg.cityline.com/*", + "https://msg.cityline.com/*.html*", "https://*.cityline.com/utsvInternet/*/home?lang=TW", "https://event.cityline.com/", "https://event.cityline.com/queue?loc=*" @@ -432,5 +432,5 @@ ] } ], - "version": "1.0.22" + "version": "1.0.23" } \ No newline at end of file