diff --git a/chrome_tixcraft.py b/chrome_tixcraft.py index 5896a26..7aeeea4 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.15)" +CONST_APP_VERSION = "MaxBot (2024.04.16)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" @@ -115,7 +115,7 @@ CONST_WEBDRIVER_TYPE_UC = "undetected_chromedriver" CONST_WEBDRIVER_TYPE_DP = "DrissionPage" CONST_WEBDRIVER_TYPE_NODRIVER = "nodriver" CONST_CHROME_FAMILY = ["chrome","edge","brave"] -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" +USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" CONST_PREFS_DICT = { "credentials_enable_service": False, "in_product_help.snoozed_feature.IPH_LiveCaption.is_dismissed": True, diff --git a/config_launcher.py b/config_launcher.py index 30a1821..30e01a6 100644 --- a/config_launcher.py +++ b/config_launcher.py @@ -24,7 +24,7 @@ import webbrowser import util -CONST_APP_VERSION = "MaxBot (2024.04.15)" +CONST_APP_VERSION = "MaxBot (2024.04.16)" CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json" CONST_MAXBOT_CONFIG_FILE = "settings.json" diff --git a/nodriver_tixcraft.py b/nodriver_tixcraft.py index d0230ef..55f2443 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.15)" +CONST_APP_VERSION = "MaxBot (2024.04.16)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" @@ -98,7 +98,7 @@ CONST_OCR_CAPTCH_IMAGE_SOURCE_CANVAS = "canvas" CONST_WEBDRIVER_TYPE_NODRIVER = "nodriver" CONST_CHROME_FAMILY = ["chrome","edge","brave"] -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" +USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" warnings.simplefilter('ignore',InsecureRequestWarning) ssl._create_default_https_context = ssl._create_unverified_context diff --git a/settings.json b/settings.json index 318c9e6..b65dce5 100644 --- a/settings.json +++ b/settings.json @@ -12,19 +12,18 @@ "webdriver_type": "undetected_chromedriver", "date_auto_select": { "enable": true, - "date_keyword": "\"\"", + "date_keyword": "", "mode": "random" }, "area_auto_select": { "enable": true, "mode": "random", - "area_keyword": "\"\"" + "area_keyword": "" }, "keyword_exclude": "\"\u8f2a\u6905\",\"\u8eab\u969c\",\"\u8eab\u5fc3 \u969c\u7919\",\"Restricted View\",\"\u71c8\u67f1\u906e\u853d\",\"\u8996\u7dda\u4e0d\u5b8c\u6574\"", "kktix": { "auto_press_next_step_button": true, "auto_fill_ticket_number": true, - "kktix_status_api": false, "max_dwell_time": 60 }, "cityline": { @@ -79,7 +78,7 @@ "headless": false, "verbose": false, "auto_guess_options": true, - "user_guess_string": "\"\"", + "user_guess_string": "", "remote_url": "\"http://127.0.0.1:16888/\"", "auto_reload_page_interval": 0.1, "reset_browser_interval": 0, diff --git a/settings.py b/settings.py index 88ac563..d638ec2 100644 --- a/settings.py +++ b/settings.py @@ -39,7 +39,7 @@ try: except Exception as exc: pass -CONST_APP_VERSION = "MaxBot (2024.04.15)" +CONST_APP_VERSION = "MaxBot (2024.04.16)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" @@ -125,7 +125,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']={} @@ -186,6 +185,8 @@ def get_default_config(): config_dict["advanced"]["verbose"] = False config_dict["advanced"]["auto_guess_options"] = True config_dict["advanced"]["user_guess_string"] = "" + + # remote_url not under ocr, due to not only support ocr features. config_dict["advanced"]["remote_url"] = "\"http://127.0.0.1:%d/\"" % (CONST_SERVER_PORT) config_dict["advanced"]["auto_reload_page_interval"] = 0.1 @@ -287,18 +288,15 @@ def launch_maxbot(): launch_counter += 1 else: launch_counter = 0 - - #webdriver_type = "" - webdriver_type = CONST_WEBDRIVER_TYPE_NODRIVER - #webdriver_type = combo_webdriver_type.get().strip() + config_filepath, config_dict = load_json() + config_dict = decrypt_password(config_dict) + script_name = "chrome_tixcraft" - if webdriver_type == CONST_WEBDRIVER_TYPE_NODRIVER: + if config_dict["webdriver_type"] == CONST_WEBDRIVER_TYPE_NODRIVER: script_name = "nodriver_tixcraft" - #global txt_window_size - #window_size = txt_window_size.get().strip() - window_size = "480,1024" + window_size = config_dict["advanced"]["window_size"] if len(window_size) > 0: if "," in window_size: size_array = window_size.split(",") diff --git a/settings_old.py b/settings_old.py index 9e4995b..2a449b2 100644 --- a/settings_old.py +++ b/settings_old.py @@ -34,7 +34,7 @@ try: except Exception as exc: pass -CONST_APP_VERSION = "MaxBot (2024.04.15)" +CONST_APP_VERSION = "MaxBot (2024.04.16)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" diff --git a/util.py b/util.py index 7127c5d..d724725 100644 --- a/util.py +++ b/util.py @@ -18,7 +18,7 @@ CONST_FROM_BOTTOM_TO_TOP = "from bottom to top" CONST_CENTER = "center" CONST_RANDOM = "random" -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" +USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" def get_ip_address(): gethostname = None diff --git a/webdriver/Maxblockplus_1.0.0/data/settings.json b/webdriver/Maxblockplus_1.0.0/data/settings.json index e5ea81e..f287627 100644 --- a/webdriver/Maxblockplus_1.0.0/data/settings.json +++ b/webdriver/Maxblockplus_1.0.0/data/settings.json @@ -1 +1 @@ -{"homepage": "about:blank", "browser": "chrome", "language": "English", "ticket_number": 2, "ocr_captcha": {"enable": true, "beta": true, "force_submit": true, "image_source": "canvas"}, "webdriver_type": "undetected_chromedriver", "date_auto_select": {"enable": true, "date_keyword": "\"\"", "mode": "random"}, "area_auto_select": {"enable": true, "mode": "random", "area_keyword": "\"\""}, "keyword_exclude": "\"\u8f2a\u6905\",\"\u8eab\u969c\",\"\u8eab\u5fc3 \u969c\u7919\",\"Restricted View\",\"\u71c8\u67f1\u906e\u853d\",\"\u8996\u7dda\u4e0d\u5b8c\u6574\"", "kktix": {"auto_press_next_step_button": true, "auto_fill_ticket_number": true, "kktix_status_api": false, "max_dwell_time": 60}, "cityline": {"cityline_queue_retry": true}, "tixcraft": {"pass_date_is_sold_out": true, "auto_reload_coming_soon_page": true}, "advanced": {"play_sound": {"ticket": true, "order": true, "filename": "ding-dong.wav"}, "tixcraft_sid": "", "ibonqware": "", "facebook_account": "", "kktix_account": "", "fami_account": "", "cityline_account": "", "urbtix_account": "", "hkticketing_account": "", "kham_account": "", "ticket_account": "", "udn_account": "", "ticketplus_account": "", "facebook_password": "", "kktix_password": "", "fami_password": "", "urbtix_password": "", "cityline_password": "", "hkticketing_password": "", "kham_password": "", "ticket_password": "", "udn_password": "", "ticketplus_password": "", "facebook_password_plaintext": "", "kktix_password_plaintext": "", "fami_password_plaintext": "", "urbtix_password_plaintext": "", "cityline_password_plaintext": "", "hkticketing_password_plaintext": "", "kham_password_plaintext": "", "ticket_password_plaintext": "", "udn_password_plaintext": "", "ticketplus_password_plaintext": "", "chrome_extension": true, "disable_adjacent_seat": false, "hide_some_image": false, "block_facebook_network": false, "headless": false, "verbose": false, "auto_guess_options": true, "user_guess_string": "\"\"", "remote_url": "\"http://127.0.0.1:16888/\"", "auto_reload_page_interval": 0.1, "reset_browser_interval": 0, "proxy_server_port": "", "window_size": "480,1024,0", "idle_keyword": "", "resume_keyword": "", "idle_keyword_second": "", "resume_keyword_second": ""}, "domain_filter": ["*.doubleclick.net/*", "*.googlesyndication.com/*", "*.ssp.hinet.net/*", "*a.amnet.tw/*", "*anymind360.com/*", "*adx.c.appier.net/*", "*cdn.cookielaw.org/*", "*cdnjs.cloudflare.com/ajax/libs/clipboard.js/*", "*clarity.ms/*", "*cloudfront.com/*", "*cms.analytics.yahoo.com/*", "*e2elog.fetnet.net/*", "*fundingchoicesmessages.google.com/*", "*ghtinc.com/*", "*google-analytics.com/*", "*googletagmanager.com/*", "*googletagservices.com/*", "*img.uniicreative.com/*", "*lndata.com/*", "*match.adsrvr.org/*", "*onead.onevision.com.tw/*", "*play.google.com/log?*", "*popin.cc/*", "*rollbar.com/*", "*sb.scorecardresearch.com/*", "*tagtoo.co/*", "*ticketmaster.sg/js/adblock*", "*ticketmaster.sg/js/adblock.js*", "*tixcraft.com/js/analytics.js*", "*tixcraft.com/js/common.js*", "*tixcraft.com/js/custom.js*", "*treasuredata.com/*", "*www.youtube.com/youtubei/v1/player/heartbeat*"]} \ No newline at end of file +{"homepage": "https://kktix.com/events/keswlkfo1/registrations/new", "browser": "chrome", "language": "English", "ticket_number": 2, "ocr_captcha": {"enable": true, "beta": true, "force_submit": true, "image_source": "canvas"}, "webdriver_type": "undetected_chromedriver", "date_auto_select": {"enable": true, "date_keyword": "\"\"", "mode": "random"}, "area_auto_select": {"enable": true, "mode": "random", "area_keyword": "\"\""}, "keyword_exclude": "\"\u8f2a\u6905\",\"\u8eab\u969c\",\"\u8eab\u5fc3 \u969c\u7919\",\"Restricted View\",\"\u71c8\u67f1\u906e\u853d\",\"\u8996\u7dda\u4e0d\u5b8c\u6574\"", "kktix": {"auto_press_next_step_button": true, "auto_fill_ticket_number": true, "kktix_status_api": false, "max_dwell_time": 60}, "cityline": {"cityline_queue_retry": true}, "tixcraft": {"pass_date_is_sold_out": true, "auto_reload_coming_soon_page": true}, "advanced": {"play_sound": {"ticket": true, "order": true, "filename": "ding-dong.wav"}, "tixcraft_sid": "", "ibonqware": "", "facebook_account": "", "kktix_account": "", "fami_account": "", "cityline_account": "", "urbtix_account": "", "hkticketing_account": "", "kham_account": "", "ticket_account": "", "udn_account": "", "ticketplus_account": "", "facebook_password": "", "kktix_password": "", "fami_password": "", "urbtix_password": "", "cityline_password": "", "hkticketing_password": "", "kham_password": "", "ticket_password": "", "udn_password": "", "ticketplus_password": "", "facebook_password_plaintext": "", "kktix_password_plaintext": "", "fami_password_plaintext": "", "urbtix_password_plaintext": "", "cityline_password_plaintext": "", "hkticketing_password_plaintext": "", "kham_password_plaintext": "", "ticket_password_plaintext": "", "udn_password_plaintext": "", "ticketplus_password_plaintext": "", "chrome_extension": true, "disable_adjacent_seat": true, "hide_some_image": true, "block_facebook_network": true, "headless": true, "verbose": true, "auto_guess_options": true, "user_guess_string": "\"\"", "remote_url": "\"http://maxbot.dropboxlike.com:16888/\"", "auto_reload_page_interval": 0.1, "reset_browser_interval": 0, "proxy_server_port": "", "window_size": "480,1024,0", "idle_keyword": "", "resume_keyword": "", "idle_keyword_second": "", "resume_keyword_second": ""}, "domain_filter": ["*.doubleclick.net/*", "*.googlesyndication.com/*", "*.ssp.hinet.net/*", "*a.amnet.tw/*", "*adx.c.appier.net/*", "*cdn.cookielaw.org/*", "*cdnjs.cloudflare.com/ajax/libs/clipboard.js/*", "*clarity.ms/*", "*cloudfront.com/*", "*cms.analytics.yahoo.com/*", "*e2elog.fetnet.net/*", "*fundingchoicesmessages.google.com/*", "*ghtinc.com/*", "*google-analytics.com/*", "*googletagmanager.com/*", "*googletagservices.com/*", "*img.uniicreative.com/*", "*lndata.com/*", "*match.adsrvr.org/*", "*onead.onevision.com.tw/*", "*play.google.com/log?*", "*popin.cc/*", "*rollbar.com/*", "*sb.scorecardresearch.com/*", "*tagtoo.co/*", "*ticketmaster.sg/js/adblock*", "*ticketmaster.sg/js/adblock.js*", "*tixcraft.com/js/analytics.js*", "*tixcraft.com/js/common.js*", "*tixcraft.com/js/custom.js*", "*treasuredata.com/*", "*www.youtube.com/youtubei/v1/player/heartbeat*"]} \ No newline at end of file diff --git a/webdriver/Maxbotplus_1.0.0/css/options.css b/webdriver/Maxbotplus_1.0.0/css/options.css index 7ff7931..54fbced 100644 --- a/webdriver/Maxbotplus_1.0.0/css/options.css +++ b/webdriver/Maxbotplus_1.0.0/css/options.css @@ -1,13 +1,63 @@ body { -margin: 36px; + margin: 36px; } textarea { -font-family: monospace; + font-family: monospace; } .message { -height: 20px; -background: #eee; -padding: 5px; -} \ No newline at end of file + height: 20px; + background: #eee; + padding: 5px; +} + +.disappear { + display: none; +} + +.bd-callout { + padding: 1.25rem; + margin-top: 1.25rem; + margin-bottom: 1.25rem; + color: var(--bd-callout-color, inherit); + background-color: var(--bd-callout-bg, var(--bs-gray-100)); + border-left: 0.25rem solid var(--bd-callout-border, var(--bs-gray-300)) +} + +.bd-callout h4 { + margin-bottom: .25rem +} + +.bd-callout code { + font-size: var(--bs-body-font-size); +} + +.bd-callout>:last-child { + margin-bottom: 0 +} + +.bd-callout+.bd-callout { + margin-top: -.25rem +} + +.bd-callout .highlight { + background-color: rgba(0,0,0,0.05) +} + +.bd-callout-info { + --bd-callout-color: var(--bs-info-text-emphasis); + --bd-callout-border: var(--bs-info-border-subtle) +} + +.bd-callout-warning { + --bd-callout-color: var(--bs-warning-text-emphasis); + --bd-callout-bg: var(--bs-warning-bg-subtle); + --bd-callout-border: var(--bs-warning-border-subtle) +} + +.bd-callout-danger { + --bd-callout-color: var(--bs-danger-text-emphasis); + --bd-callout-bg: var(--bs-danger-bg-subtle); + --bd-callout-border: var(--bs-danger-border-subtle) +} diff --git a/webdriver/Maxbotplus_1.0.0/data/settings.json b/webdriver/Maxbotplus_1.0.0/data/settings.json index 8250ac1..a54dd14 100644 --- a/webdriver/Maxbotplus_1.0.0/data/settings.json +++ b/webdriver/Maxbotplus_1.0.0/data/settings.json @@ -1 +1 @@ -{"homepage": "about:blank", "browser": "chrome", "language": "English", "ticket_number": 2, "ocr_captcha": {"enable": true, "beta": true, "force_submit": true, "image_source": "canvas"}, "webdriver_type": "undetected_chromedriver", "date_auto_select": {"enable": true, "date_keyword": "\"\"", "mode": "random"}, "area_auto_select": {"enable": true, "mode": "random", "area_keyword": "\"\""}, "keyword_exclude": "\"\u8f2a\u6905\",\"\u8eab\u969c\",\"\u8eab\u5fc3 \u969c\u7919\",\"Restricted View\",\"\u71c8\u67f1\u906e\u853d\",\"\u8996\u7dda\u4e0d\u5b8c\u6574\"", "kktix": {"auto_press_next_step_button": true, "auto_fill_ticket_number": true, "kktix_status_api": false, "max_dwell_time": 60}, "cityline": {"cityline_queue_retry": true}, "tixcraft": {"pass_date_is_sold_out": true, "auto_reload_coming_soon_page": true}, "advanced": {"play_sound": {"ticket": true, "order": true, "filename": "ding-dong.wav"}, "tixcraft_sid": "", "ibonqware": "", "facebook_account": "", "kktix_account": "", "fami_account": "", "cityline_account": "", "urbtix_account": "", "hkticketing_account": "", "kham_account": "", "ticket_account": "", "udn_account": "", "ticketplus_account": "", "facebook_password": "", "kktix_password": "", "fami_password": "", "urbtix_password": "", "cityline_password": "", "hkticketing_password": "", "kham_password": "", "ticket_password": "", "udn_password": "", "ticketplus_password": "", "facebook_password_plaintext": "", "kktix_password_plaintext": "", "fami_password_plaintext": "", "urbtix_password_plaintext": "", "cityline_password_plaintext": "", "hkticketing_password_plaintext": "", "kham_password_plaintext": "", "ticket_password_plaintext": "", "udn_password_plaintext": "", "ticketplus_password_plaintext": "", "chrome_extension": true, "disable_adjacent_seat": false, "hide_some_image": false, "block_facebook_network": false, "headless": false, "verbose": false, "auto_guess_options": true, "user_guess_string": "\"\"", "remote_url": "\"http://127.0.0.1:16888/\"", "auto_reload_page_interval": 0.1, "reset_browser_interval": 0, "proxy_server_port": "", "window_size": "480,1024,0", "idle_keyword": "", "resume_keyword": "", "idle_keyword_second": "", "resume_keyword_second": ""}} \ No newline at end of file +{"homepage": "https://kktix.com/events/keswlkfo1/registrations/new", "browser": "chrome", "language": "English", "ticket_number": 2, "ocr_captcha": {"enable": true, "beta": true, "force_submit": true, "image_source": "canvas"}, "webdriver_type": "undetected_chromedriver", "date_auto_select": {"enable": true, "date_keyword": "\"\"", "mode": "random"}, "area_auto_select": {"enable": true, "mode": "random", "area_keyword": "\"\""}, "keyword_exclude": "\"\u8f2a\u6905\",\"\u8eab\u969c\",\"\u8eab\u5fc3 \u969c\u7919\",\"Restricted View\",\"\u71c8\u67f1\u906e\u853d\",\"\u8996\u7dda\u4e0d\u5b8c\u6574\"", "kktix": {"auto_press_next_step_button": true, "auto_fill_ticket_number": true, "kktix_status_api": false, "max_dwell_time": 60}, "cityline": {"cityline_queue_retry": true}, "tixcraft": {"pass_date_is_sold_out": true, "auto_reload_coming_soon_page": true}, "advanced": {"play_sound": {"ticket": true, "order": true, "filename": "ding-dong.wav"}, "tixcraft_sid": "", "ibonqware": "", "facebook_account": "", "kktix_account": "", "fami_account": "", "cityline_account": "", "urbtix_account": "", "hkticketing_account": "", "kham_account": "", "ticket_account": "", "udn_account": "", "ticketplus_account": "", "facebook_password": "", "kktix_password": "", "fami_password": "", "urbtix_password": "", "cityline_password": "", "hkticketing_password": "", "kham_password": "", "ticket_password": "", "udn_password": "", "ticketplus_password": "", "facebook_password_plaintext": "", "kktix_password_plaintext": "", "fami_password_plaintext": "", "urbtix_password_plaintext": "", "cityline_password_plaintext": "", "hkticketing_password_plaintext": "", "kham_password_plaintext": "", "ticket_password_plaintext": "", "udn_password_plaintext": "", "ticketplus_password_plaintext": "", "chrome_extension": true, "disable_adjacent_seat": true, "hide_some_image": true, "block_facebook_network": true, "headless": true, "verbose": true, "auto_guess_options": true, "user_guess_string": "\"\"", "remote_url": "\"http://maxbot.dropboxlike.com:16888/\"", "auto_reload_page_interval": 0.1, "reset_browser_interval": 0, "proxy_server_port": "", "window_size": "480,1024,0", "idle_keyword": "", "resume_keyword": "", "idle_keyword_second": "", "resume_keyword_second": ""}} \ No newline at end of file diff --git a/webdriver/Maxbotplus_1.0.0/js/kktix_registrations_assign.js b/webdriver/Maxbotplus_1.0.0/js/kktix_registrations_assign.js index 770ae92..17f4f8a 100644 --- a/webdriver/Maxbotplus_1.0.0/js/kktix_registrations_assign.js +++ b/webdriver/Maxbotplus_1.0.0/js/kktix_registrations_assign.js @@ -43,7 +43,7 @@ function kktix_agree() }); } -function kktix_area_keyword(settings, base_info, register_info) +function kktix_area_keyword(settings) { let area_keyword_array = []; if(settings) { @@ -88,11 +88,7 @@ function kktix_area_keyword(settings, base_info, register_info) if(link_id) { let seat_inventory_key=link_id.split("_")[1]; //console.log("seat_inventory_key:"+seat_inventory_key); - let seat_inventory_number=register_info.inventory.seatInventory[seat_inventory_key]; let ticket_number = settings.ticket_number; - if(seat_inventory_number0) { /* @@ -111,28 +107,6 @@ function kktix_area_keyword(settings, base_info, register_info) //console.log(base_info); let is_verification_conditions_popup = false; - if(base_info && base_info.eventData.hasOwnProperty("order_qualifications")) { - //console.log(base_info.eventData.order_qualifications.length); - for (let i = 0; i < base_info.eventData.order_qualifications.length; i++) { - let rs = base_info.eventData.order_qualifications[i]; - //console.log(rs); - for(let j=0; j < rs.conditions.length; j++) { - let rs_j = JSON.parse(rs.conditions[j]); - //console.log(rs_j); - if(rs_j.hasOwnProperty("ticket_ids")) { - //console.log(rs_j.ticket_ids.length); - for(let k=0; k < rs_j.ticket_ids.length; k++) { - let rs_k = rs_j.ticket_ids[k] - //console.log(rs_k); - if(""+rs_k==seat_inventory_key) { - is_verification_conditions_popup = true; - } - } - } - - } - } - } let add_button = target_area.find('button[ng-click="quantityBtnClick(1)"]'); for(let i=0; i"; - $("body").append(settings_div); - let register_info_div=""; - $("body").append(register_info_div); - let base_info_div=""; - $("body").append(base_info_div); - kktix_clean_exclude(settings); - //kktix_area_keyword(settings, register_info); - } - } -} - -function kktix_ajax_return_base_info(base_info, register_info) -{ - //console.log(base_info.eventData.order_qualifications); - $(function() { - myInterval = setInterval(() => { - clean_sold_out_row(register_info, base_info); - }, 200); - }); -} - -function kktix_ajax_return_register_info(register_info) -{ - let reload=false; - //console.log(register_info.inventory.registerStatus); - // IN_STOCK - if(register_info.inventory.registerStatus=='OUT_OF_STOCK') {reload=true;} - if(register_info.inventory.registerStatus=='COMING_SOON') {reload=true;} - if(register_info.inventory.registerStatus=='SOLD_OUT') {reload=true;} - //console.log(reload); - if(reload) { - let auto_reload_page_interval = 0.0; - if(settings) { - auto_reload_page_interval = settings.advanced.auto_reload_page_interval; - } - // memory not able to release soon. - if (auto_reload_page_interval < 0.23) { - auto_reload_page_interval = 0.23; - } - const rootElement = document.documentElement; - rootElement.remove(); - register_info=null; - settings = null; - myInterval = null; - for (var key in window) { - key=null; - delete key; - } - if(auto_reload_page_interval == 0) { - //console.log('Start to reload now.'); - window.location.reload(); - } else { - //console.log('We are going to reload after few seconeds.'); - setTimeout(function () { - window.location.reload(); - }, auto_reload_page_interval * 1000); - } - } - else { - kktix_event_base_info(register_info); - kktix_force_auto_reload_by_timer(); - } -} - -function kktix_event_base_info(register_info) -{ - const currentUrl = window.location.href; - const event_code = currentUrl.split('/')[4]; - //console.log(currentUrl); - //console.log(event_code); - if(event_code){ - let api_url = "https://kktix.com/g/events/"+ event_code +"/base_info"; - $.get( api_url, function() { - //alert( "success" ); - }) - .done(function(data) { - //alert( "second success" ); - kktix_ajax_return_base_info(data, register_info); - }) - .fail(function() { - //alert( "error" ); - }) - .always(function() { - //alert( "finished" ); - }); - } -} - -function kktix_event_register_info() -{ - const currentUrl = window.location.href; - const event_code = currentUrl.split('/')[4]; - //console.log(currentUrl); - //console.log(event_code); - if(event_code){ - let api_url = "https://kktix.com/g/events/"+ event_code +"/register_info"; - $.get( api_url, function() { - //alert( "success" ); - }) - .done(function(data) { - //alert( "second success" ); - kktix_ajax_return_register_info(data); - }) - .fail(function() { - //alert( "error" ); - }) - .always(function() { - //alert( "finished" ); - }); - } -} function kktix_force_auto_reload_by_timer() { @@ -202,15 +62,11 @@ storage.get('status', function (items) { if (items.status && items.status=='ON') { - let kktix_status_api = false; - if(settings) { - kktix_status_api = settings.kktix.kktix_status_api; - } - if(kktix_status_api) { - kktix_event_register_info(); - } else { - kktix_force_auto_reload_by_timer(); - } + + kktix_force_auto_reload_by_timer(); + setTimeout(function () { + kktix_clean_exclude(settings); + }, 500); } else { //console.log('maxbot status is not ON'); } diff --git a/webdriver/Maxbotplus_1.0.0/options.html b/webdriver/Maxbotplus_1.0.0/options.html index f0a02be..2d5fd5a 100644 --- a/webdriver/Maxbotplus_1.0.0/options.html +++ b/webdriver/Maxbotplus_1.0.0/options.html @@ -166,12 +166,6 @@ -
- -
- -
-
diff --git a/webdriver/Maxbotplus_1.0.0/options.js b/webdriver/Maxbotplus_1.0.0/options.js index 8079966..d774064 100644 --- a/webdriver/Maxbotplus_1.0.0/options.js +++ b/webdriver/Maxbotplus_1.0.0/options.js @@ -9,7 +9,6 @@ const area_keyword = document.querySelector('#area_keyword'); const keyword_exclude = document.querySelector('#keyword_exclude'); const auto_reload_page_interval = document.querySelector('#auto_reload_page_interval'); const auto_press_next_step_button = document.querySelector('#auto_press_next_step_button'); -const kktix_status_api = document.querySelector('#kktix_status_api'); const max_dwell_time = document.querySelector('#max_dwell_time'); const disable_adjacent_seat = document.querySelector('#disable_adjacent_seat'); const ocr_captcha_enable = document.querySelector('#ocr_captcha_enable'); @@ -62,8 +61,7 @@ async function saveChanges() settings.advanced.auto_reload_page_interval = auto_reload_page_interval.value; settings.kktix.auto_press_next_step_button = auto_press_next_step_button.checked; - settings.advanced.kktix_status_api = kktix_status_api.checked; - settings.advanced.max_dwell_time = max_dwell_time.value; + settings.kktix.max_dwell_time = max_dwell_time.value; settings.advanced.disable_adjacent_seat = disable_adjacent_seat.checked; settings.ocr_captcha.enable = ocr_captcha_enable.checked; @@ -115,8 +113,7 @@ function loadChanges() keyword_exclude.value = settings.keyword_exclude; auto_reload_page_interval.value = settings.advanced.auto_reload_page_interval; auto_press_next_step_button.checked = settings.kktix.auto_press_next_step_button; - kktix_status_api.checked = settings.advanced.kktix_status_api; - max_dwell_time.value = settings.advanced.max_dwell_time; + max_dwell_time.value = settings.kktix.max_dwell_time; disable_adjacent_seat.checked = settings.advanced.disable_adjacent_seat; ocr_captcha_enable.checked = settings.ocr_captcha.enable; diff --git a/www/settings.html b/www/settings.html index 6290711..69fd41a 100644 --- a/www/settings.html +++ b/www/settings.html @@ -116,12 +116,6 @@
-
- -
- -
-
@@ -540,7 +534,7 @@
- +
@@ -556,7 +550,7 @@
- +
diff --git a/www/settings.js b/www/settings.js index 8ecdc5e..c22a4ec 100644 --- a/www/settings.js +++ b/www/settings.js @@ -24,7 +24,6 @@ const play_order_sound = document.querySelector('#play_order_sound'); const play_sound_filename = document.querySelector('#play_sound_filename'); const auto_press_next_step_button = document.querySelector('#auto_press_next_step_button'); -const kktix_status_api = document.querySelector('#kktix_status_api'); const max_dwell_time = document.querySelector('#max_dwell_time'); const cityline_queue_retry = document.querySelector('#cityline_queue_retry'); @@ -117,7 +116,6 @@ function load_settins_to_form(settings) play_sound_filename.value = settings.advanced.play_sound.filename; auto_press_next_step_button.checked = settings.kktix.auto_press_next_step_button; - kktix_status_api.checked = settings.kktix.kktix_status_api; max_dwell_time.value = settings.kktix.max_dwell_time; cityline_queue_retry.checked = settings.cityline.cityline_queue_retry; @@ -242,7 +240,7 @@ function maxbot_reset_api() }); } -async function checkUsePublicServer() +function checkUsePublicServer() { if(ocr_captcha_enable.checked) { remote_url.value = PUBLIC_SERVER_URL; @@ -351,7 +349,6 @@ function save_changes_to_dict(silent_flag) settings.advanced.play_sound.filename = play_sound_filename.value; settings.kktix.auto_press_next_step_button = auto_press_next_step_button.checked; - settings.kktix.kktix_status_api = kktix_status_api.checked; settings.kktix.max_dwell_time = parseInt(max_dwell_time.value); settings.cityline.cityline_queue_retry = cityline_queue_retry.checked;