2024-03-02, add kktix-status app
parent
a5e240bdb7
commit
0f8867dbca
|
@ -41,7 +41,7 @@ try:
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.03.01)"
|
CONST_APP_VERSION = "MaxBot (2024.03.02)"
|
||||||
|
|
||||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
@ -111,7 +111,7 @@ CONST_WEBDRIVER_TYPE_SELENIUM = "selenium"
|
||||||
CONST_WEBDRIVER_TYPE_UC = "undetected_chromedriver"
|
CONST_WEBDRIVER_TYPE_UC = "undetected_chromedriver"
|
||||||
CONST_WEBDRIVER_TYPE_DP = "DrissionPage"
|
CONST_WEBDRIVER_TYPE_DP = "DrissionPage"
|
||||||
CONST_CHROME_FAMILY = ["chrome","edge","brave"]
|
CONST_CHROME_FAMILY = ["chrome","edge","brave"]
|
||||||
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
|
||||||
|
|
||||||
warnings.simplefilter('ignore',InsecureRequestWarning)
|
warnings.simplefilter('ignore',InsecureRequestWarning)
|
||||||
ssl._create_default_https_context = ssl._create_unverified_context
|
ssl._create_default_https_context = ssl._create_unverified_context
|
||||||
|
@ -4765,7 +4765,7 @@ def kktix_reg_new_main(driver, config_dict, fail_list, played_sound_ticket, is_f
|
||||||
|
|
||||||
return fail_list, played_sound_ticket
|
return fail_list, played_sound_ticket
|
||||||
|
|
||||||
def kktix_get_registerStatus(driver, event_code):
|
def kktix_get_registerStatus(event_code):
|
||||||
html_result = None
|
html_result = None
|
||||||
|
|
||||||
url = "https://kktix.com/g/events/%s/register_info" % (event_code)
|
url = "https://kktix.com/g/events/%s/register_info" % (event_code)
|
||||||
|
@ -4800,21 +4800,23 @@ def kktix_get_registerStatus(driver, event_code):
|
||||||
#print("registerStatus:", registerStatus)
|
#print("registerStatus:", registerStatus)
|
||||||
return registerStatus
|
return registerStatus
|
||||||
|
|
||||||
def kktix_check_register_status(driver, url):
|
def kktix_get_event_code(url):
|
||||||
#ex: https://xxx.kktix.cc/events/xxx
|
event_code = ""
|
||||||
|
if '/registrations/new' in url:
|
||||||
prefix_list = ['.com/events/','.cc/events/']
|
prefix_list = ['.com/events/','.cc/events/']
|
||||||
postfix = '/registrations/new'
|
postfix = '/registrations/new'
|
||||||
|
|
||||||
is_match_event_code = False
|
|
||||||
event_code = ""
|
|
||||||
for prefix in prefix_list:
|
for prefix in prefix_list:
|
||||||
event_code = find_between(url,prefix,postfix)
|
event_code = find_between(url,prefix,postfix)
|
||||||
if len(event_code) > 0:
|
if len(event_code) > 0:
|
||||||
is_match_event_code = True
|
|
||||||
#print('event_code:',event_code)
|
|
||||||
break
|
break
|
||||||
|
|
||||||
if is_match_event_code:
|
#print('event_code:',event_code)
|
||||||
|
return event_code
|
||||||
|
|
||||||
|
def kktix_check_register_status(driver, url):
|
||||||
|
event_code = kktix_get_event_code(url)
|
||||||
|
if len(event_code) > 0:
|
||||||
js = '''
|
js = '''
|
||||||
function load_kktix_register_code(){
|
function load_kktix_register_code(){
|
||||||
let api_url = "https://kktix.com/g/events/%s/register_info";
|
let api_url = "https://kktix.com/g/events/%s/register_info";
|
||||||
|
@ -4850,12 +4852,12 @@ if (typeof $.kkUser.checked_status_register_code === 'undefined') {
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
registerStatus = None
|
||||||
|
|
||||||
# use javascritp version only.
|
# use javascritp version only.
|
||||||
is_match_event_code = False
|
is_match_event_code = False
|
||||||
|
|
||||||
registerStatus = None
|
|
||||||
if is_match_event_code:
|
if is_match_event_code:
|
||||||
kktix_get_registerStatus(driver, event_code)
|
registerStatus = kktix_get_registerStatus(event_code)
|
||||||
return registerStatus
|
return registerStatus
|
||||||
|
|
||||||
def kktix_reg_auto_reload(driver, url, config_dict):
|
def kktix_reg_auto_reload(driver, url, config_dict):
|
||||||
|
|
|
@ -22,7 +22,7 @@ import sys
|
||||||
import threading
|
import threading
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.03.01)"
|
CONST_APP_VERSION = "MaxBot (2024.03.02)"
|
||||||
|
|
||||||
CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json"
|
CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
@ -544,7 +544,7 @@ def clearFrame(frame):
|
||||||
def load_GUI(root, config_dict):
|
def load_GUI(root, config_dict):
|
||||||
clearFrame(root)
|
clearFrame(root)
|
||||||
|
|
||||||
language_code="en_us"
|
#language_code="en_us"
|
||||||
language_code = get_language_code_by_name(config_dict["advanced"]["language"])
|
language_code = get_language_code_by_name(config_dict["advanced"]["language"])
|
||||||
|
|
||||||
row_count = 0
|
row_count = 0
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -48,7 +48,7 @@ try:
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.03.01)"
|
CONST_APP_VERSION = "MaxBot (2024.03.02)"
|
||||||
|
|
||||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
|
Loading…
Reference in New Issue