2023-12-11 for tixcraft
parent
7416303e1c
commit
f7e15029f5
|
@ -560,7 +560,15 @@ def get_uc_options(uc, config_dict, webdriver_path):
|
||||||
options.unhandled_prompt_behavior = "accept"
|
options.unhandled_prompt_behavior = "accept"
|
||||||
#print("strategy", options.page_load_strategy)
|
#print("strategy", options.page_load_strategy)
|
||||||
|
|
||||||
options.set_capability("goog:loggingPrefs",{"performance": "ALL"})
|
is_log_performace = False
|
||||||
|
performace_site = ['ticketplus']
|
||||||
|
for site in performace_site:
|
||||||
|
if site in config_dict["homepage"]:
|
||||||
|
is_log_performace = True
|
||||||
|
break
|
||||||
|
|
||||||
|
if is_log_performace:
|
||||||
|
options.set_capability("goog:loggingPrefs",{"performance": "ALL"})
|
||||||
|
|
||||||
if config_dict["advanced"]["adblock_plus_enable"]:
|
if config_dict["advanced"]["adblock_plus_enable"]:
|
||||||
load_extension_path = ""
|
load_extension_path = ""
|
||||||
|
@ -854,6 +862,8 @@ def get_driver_by_config(config_dict):
|
||||||
NETWORK_BLOCKED_URLS.append('*.woff2')
|
NETWORK_BLOCKED_URLS.append('*.woff2')
|
||||||
NETWORK_BLOCKED_URLS.append('*.ttf')
|
NETWORK_BLOCKED_URLS.append('*.ttf')
|
||||||
NETWORK_BLOCKED_URLS.append('*.otf')
|
NETWORK_BLOCKED_URLS.append('*.otf')
|
||||||
|
NETWORK_BLOCKED_URLS.append('*fonts.googleapis.com/earlyaccess/*')
|
||||||
|
NETWORK_BLOCKED_URLS.append('*/ajax/libs/font-awesome/*')
|
||||||
NETWORK_BLOCKED_URLS.append('*.ico')
|
NETWORK_BLOCKED_URLS.append('*.ico')
|
||||||
NETWORK_BLOCKED_URLS.append('*ticketimg2.azureedge.net/image/ActivityImage/*')
|
NETWORK_BLOCKED_URLS.append('*ticketimg2.azureedge.net/image/ActivityImage/*')
|
||||||
NETWORK_BLOCKED_URLS.append('*static.tixcraft.com/images/activity/*')
|
NETWORK_BLOCKED_URLS.append('*static.tixcraft.com/images/activity/*')
|
||||||
|
@ -7583,12 +7593,19 @@ def tixcraft_main(driver, url, config_dict, tixcraft_dict, ocr, Captcha_Browser)
|
||||||
if not 'ticketmaster' in domain_name:
|
if not 'ticketmaster' in domain_name:
|
||||||
# for tixcraft
|
# for tixcraft
|
||||||
tixcraft_area_auto_select(driver, url, config_dict)
|
tixcraft_area_auto_select(driver, url, config_dict)
|
||||||
|
tixcraft_dict["area_retry_count"]+=1
|
||||||
|
#print("count:", tixcraft_dict["area_retry_count"])
|
||||||
|
if tixcraft_dict["area_retry_count"] >= (60 * 15):
|
||||||
|
# Cool-down
|
||||||
|
tixcraft_dict["area_retry_count"] = 0
|
||||||
|
time.sleep(3)
|
||||||
else:
|
else:
|
||||||
# area auto select is too difficult, skip in this version.
|
# area auto select is too difficult, skip in this version.
|
||||||
tixcraft_dict["fail_promo_list"] = ticketmaster_promo(driver, config_dict, tixcraft_dict["fail_promo_list"])
|
tixcraft_dict["fail_promo_list"] = ticketmaster_promo(driver, config_dict, tixcraft_dict["fail_promo_list"])
|
||||||
ticketmaster_assign_ticket_number(driver, config_dict)
|
ticketmaster_assign_ticket_number(driver, config_dict)
|
||||||
else:
|
else:
|
||||||
tixcraft_dict["fail_promo_list"] = []
|
tixcraft_dict["fail_promo_list"] = []
|
||||||
|
tixcraft_dict["area_retry_count"]=0
|
||||||
|
|
||||||
# https://ticketmaster.sg/ticket/check-captcha/23_blackpink/954/5/75
|
# https://ticketmaster.sg/ticket/check-captcha/23_blackpink/954/5/75
|
||||||
if '/ticket/check-captcha/' in url:
|
if '/ticket/check-captcha/' in url:
|
||||||
|
@ -12139,6 +12156,7 @@ def main(args):
|
||||||
tixcraft_dict["done_time"]=None
|
tixcraft_dict["done_time"]=None
|
||||||
tixcraft_dict["elapsed_time"]=None
|
tixcraft_dict["elapsed_time"]=None
|
||||||
tixcraft_dict["is_popup_checkout"] = False
|
tixcraft_dict["is_popup_checkout"] = False
|
||||||
|
tixcraft_dict["area_retry_count"]=0
|
||||||
|
|
||||||
# for kktix
|
# for kktix
|
||||||
kktix_dict = {}
|
kktix_dict = {}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import sys
|
||||||
import threading
|
import threading
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2023.12.09)"
|
CONST_APP_VERSION = "MaxBot (2023.12.11)"
|
||||||
|
|
||||||
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"
|
||||||
|
|
|
@ -34,7 +34,7 @@ import ssl
|
||||||
|
|
||||||
ssl._create_default_https_context = ssl._create_unverified_context
|
ssl._create_default_https_context = ssl._create_unverified_context
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2023.12.10)"
|
CONST_APP_VERSION = "MaxBot (2023.12.11)"
|
||||||
|
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
|
CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
|
||||||
|
|
|
@ -27,7 +27,7 @@ import pyperclip
|
||||||
import tornado
|
import tornado
|
||||||
from tornado.web import Application
|
from tornado.web import Application
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2023.12.09)"
|
CONST_APP_VERSION = "MaxBot (2023.12.11)"
|
||||||
|
|
||||||
CONST_MAXBOT_QUESTION_FILE = "MAXBOT_QUESTION.txt"
|
CONST_MAXBOT_QUESTION_FILE = "MAXBOT_QUESTION.txt"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue