|
|
|
@ -34,7 +34,7 @@ try:
|
|
|
|
|
except Exception as exc:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
CONST_APP_VERSION = "MaxBot (2024.04.17)"
|
|
|
|
|
CONST_APP_VERSION = "MaxBot (2024.04.18)"
|
|
|
|
|
|
|
|
|
|
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
|
|
|
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
|
|
|
@ -129,7 +129,6 @@ def load_translate():
|
|
|
|
|
en_us["pass_date_is_sold_out"] = 'Pass date is sold out'
|
|
|
|
|
en_us["auto_reload_coming_soon_page"] = 'Reload coming soon page'
|
|
|
|
|
en_us["auto_reload_page_interval"] = 'Reload page interval(sec.)'
|
|
|
|
|
en_us["kktix_status_api"] = 'KKTIX status API'
|
|
|
|
|
en_us["max_dwell_time"] = 'KKTIX dwell time(sec.)'
|
|
|
|
|
en_us["cityline_queue_retry"] = 'cityline queue retry'
|
|
|
|
|
en_us["reset_browser_interval"] = 'Reset browser interval(sec.)'
|
|
|
|
@ -249,7 +248,6 @@ def load_translate():
|
|
|
|
|
zh_tw["pass_date_is_sold_out"] = '避開「搶購一空」的日期'
|
|
|
|
|
zh_tw["auto_reload_coming_soon_page"] = '自動刷新倒數中的日期頁面'
|
|
|
|
|
zh_tw["auto_reload_page_interval"] = '自動刷新頁面間隔(秒)'
|
|
|
|
|
zh_tw["kktix_status_api"] = 'KKTIX購票狀態API'
|
|
|
|
|
zh_tw["max_dwell_time"] = 'KKTIX購票最長停留(秒)'
|
|
|
|
|
zh_tw["reset_browser_interval"] = '重新啓動瀏覽器間隔(秒)'
|
|
|
|
|
zh_tw["cityline_queue_retry"] = 'cityline queue retry'
|
|
|
|
@ -369,7 +367,6 @@ def load_translate():
|
|
|
|
|
zh_cn["pass_date_is_sold_out"] = '避开“抢购一空”的日期'
|
|
|
|
|
zh_cn["auto_reload_coming_soon_page"] = '自动刷新倒数中的日期页面'
|
|
|
|
|
zh_cn["auto_reload_page_interval"] = '重新加载间隔(秒)'
|
|
|
|
|
zh_cn["kktix_status_api"] = 'KKTIX购票状态API'
|
|
|
|
|
zh_cn["cityline_queue_retry"] = 'cityline queue retry'
|
|
|
|
|
zh_cn["max_dwell_time"] = '购票网页最长停留(秒)'
|
|
|
|
|
zh_cn["reset_browser_interval"] = '重新启动浏览器间隔(秒)'
|
|
|
|
@ -490,7 +487,6 @@ def load_translate():
|
|
|
|
|
ja_jp["pass_date_is_sold_out"] = '「売り切れ」公演を避ける'
|
|
|
|
|
ja_jp["auto_reload_coming_soon_page"] = '公開予定のページをリロード'
|
|
|
|
|
ja_jp["auto_reload_page_interval"] = 'リロード間隔(秒)'
|
|
|
|
|
ja_jp["kktix_status_api"] = 'KKTIX status API'
|
|
|
|
|
ja_jp["max_dwell_time"] = '最大滞留時間(秒)'
|
|
|
|
|
ja_jp["cityline_queue_retry"] = 'cityline queue retry'
|
|
|
|
|
ja_jp["reset_browser_interval"] = 'ブラウザの再起動間隔(秒)'
|
|
|
|
@ -616,7 +612,6 @@ def get_default_config():
|
|
|
|
|
config_dict['kktix']={}
|
|
|
|
|
config_dict["kktix"]["auto_press_next_step_button"] = True
|
|
|
|
|
config_dict["kktix"]["auto_fill_ticket_number"] = True
|
|
|
|
|
config_dict["kktix"]["kktix_status_api"] = False
|
|
|
|
|
config_dict["kktix"]["max_dwell_time"] = 60
|
|
|
|
|
|
|
|
|
|
config_dict['cityline']={}
|
|
|
|
@ -799,7 +794,6 @@ def btn_save_act(slience_mode=False):
|
|
|
|
|
global chk_state_pass_date_is_sold_out
|
|
|
|
|
global chk_state_auto_reload_coming_soon_page
|
|
|
|
|
global txt_auto_reload_page_interval
|
|
|
|
|
global chk_status_kktix_status_api
|
|
|
|
|
global txt_max_dwell_time
|
|
|
|
|
global chk_status_cityline_queue_retry
|
|
|
|
|
global txt_reset_browser_intervalv
|
|
|
|
@ -890,7 +884,6 @@ def btn_save_act(slience_mode=False):
|
|
|
|
|
if is_all_data_correct:
|
|
|
|
|
config_dict["kktix"]["auto_press_next_step_button"] = bool(chk_state_auto_press_next_step_button.get())
|
|
|
|
|
config_dict["kktix"]["auto_fill_ticket_number"] = bool(chk_state_auto_fill_ticket_number.get())
|
|
|
|
|
config_dict["kktix"]["kktix_status_api"] = bool(chk_state_kktix_status_api.get())
|
|
|
|
|
|
|
|
|
|
config_dict["kktix"]["max_dwell_time"] = int(txt_max_dwell_time.get().strip())
|
|
|
|
|
if config_dict["kktix"]["max_dwell_time"] > 0:
|
|
|
|
@ -1341,8 +1334,6 @@ def applyNewLanguage():
|
|
|
|
|
global lbl_block_facebook_network_recommand
|
|
|
|
|
|
|
|
|
|
global lbl_auto_reload_page_interval
|
|
|
|
|
global lbl_kktix_status_api
|
|
|
|
|
global chk_kktix_status_api
|
|
|
|
|
global lbl_max_dwell_time
|
|
|
|
|
global lbl_cityline_queue_retry
|
|
|
|
|
global chk_cityline_queue_retry
|
|
|
|
@ -1384,7 +1375,6 @@ def applyNewLanguage():
|
|
|
|
|
lbl_block_facebook_network_recommand.config(text=translate[language_code]["recommand_enable"])
|
|
|
|
|
|
|
|
|
|
lbl_auto_reload_page_interval.config(text=translate[language_code]["auto_reload_page_interval"])
|
|
|
|
|
lbl_kktix_status_api.config(text=translate[language_code]["kktix_status_api"])
|
|
|
|
|
lbl_max_dwell_time.config(text=translate[language_code]["max_dwell_time"])
|
|
|
|
|
lbl_cityline_queue_retry.config(text=translate[language_code]["cityline_queue_retry"])
|
|
|
|
|
lbl_reset_browser_interval.config(text=translate[language_code]["reset_browser_interval"])
|
|
|
|
@ -1428,7 +1418,6 @@ def applyNewLanguage():
|
|
|
|
|
chk_headless.config(text=translate[language_code]["enable"])
|
|
|
|
|
chk_verbose.config(text=translate[language_code]["enable"])
|
|
|
|
|
chk_auto_guess_options.config(text=translate[language_code]["enable"])
|
|
|
|
|
chk_kktix_status_api.config(text=translate[language_code]["enable"])
|
|
|
|
|
chk_cityline_queue_retry.config(text=translate[language_code]["enable"])
|
|
|
|
|
|
|
|
|
|
tabControl.tab(0, text=translate[language_code]["preference"])
|
|
|
|
@ -2057,20 +2046,6 @@ def AdvancedTab(root, config_dict, language_code, UI_PADDING_X):
|
|
|
|
|
|
|
|
|
|
group_row_count +=1
|
|
|
|
|
|
|
|
|
|
global lbl_kktix_status_api
|
|
|
|
|
lbl_kktix_status_api = Label(frame_group_header, text=translate[language_code]['kktix_status_api'])
|
|
|
|
|
lbl_kktix_status_api.grid(column=0, row=group_row_count, sticky = E)
|
|
|
|
|
|
|
|
|
|
global chk_state_kktix_status_api
|
|
|
|
|
chk_state_kktix_status_api = BooleanVar()
|
|
|
|
|
chk_state_kktix_status_api.set(config_dict["kktix"]["kktix_status_api"])
|
|
|
|
|
|
|
|
|
|
global chk_kktix_status_api
|
|
|
|
|
chk_kktix_status_api = Checkbutton(frame_group_header, text=translate[language_code]['enable'], variable=chk_state_kktix_status_api)
|
|
|
|
|
chk_kktix_status_api.grid(column=1, row=group_row_count, sticky = W)
|
|
|
|
|
|
|
|
|
|
group_row_count +=1
|
|
|
|
|
|
|
|
|
|
global lbl_max_dwell_time
|
|
|
|
|
lbl_max_dwell_time = Label(frame_group_header, text=translate[language_code]['max_dwell_time'])
|
|
|
|
|
lbl_max_dwell_time.grid(column=0, row=group_row_count, sticky = E)
|
|
|
|
@ -3154,7 +3129,7 @@ def main_gui():
|
|
|
|
|
load_GUI(root, config_dict)
|
|
|
|
|
|
|
|
|
|
GUI_SIZE_WIDTH = 590
|
|
|
|
|
GUI_SIZE_HEIGHT = 665
|
|
|
|
|
GUI_SIZE_HEIGHT = 645
|
|
|
|
|
|
|
|
|
|
GUI_SIZE_MACOS = str(GUI_SIZE_WIDTH) + 'x' + str(GUI_SIZE_HEIGHT)
|
|
|
|
|
GUI_SIZE_WINDOWS=str(GUI_SIZE_WIDTH-70) + 'x' + str(GUI_SIZE_HEIGHT-80)
|
|
|
|
@ -3320,7 +3295,6 @@ async def main_server():
|
|
|
|
|
print("server running on port:", CONST_SERVER_PORT)
|
|
|
|
|
await asyncio.Event().wait()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def web_server():
|
|
|
|
|
is_port_binded = util.is_connectable(CONST_SERVER_PORT)
|
|
|
|
|
#print("is_port_binded:", is_port_binded)
|
|
|
|
|