2023-12-11 for tixcraft

master
CHUN YU YAO 2023-12-15 23:49:01 +08:00
parent 7416303e1c
commit f7e15029f5
4 changed files with 22 additions and 4 deletions

View File

@ -560,6 +560,14 @@ def get_uc_options(uc, config_dict, webdriver_path):
options.unhandled_prompt_behavior = "accept"
#print("strategy", options.page_load_strategy)
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"]:
@ -854,6 +862,8 @@ def get_driver_by_config(config_dict):
NETWORK_BLOCKED_URLS.append('*.woff2')
NETWORK_BLOCKED_URLS.append('*.ttf')
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('*ticketimg2.azureedge.net/image/ActivityImage/*')
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:
# for tixcraft
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:
# 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"])
ticketmaster_assign_ticket_number(driver, config_dict)
else:
tixcraft_dict["fail_promo_list"] = []
tixcraft_dict["area_retry_count"]=0
# https://ticketmaster.sg/ticket/check-captcha/23_blackpink/954/5/75
if '/ticket/check-captcha/' in url:
@ -12139,6 +12156,7 @@ def main(args):
tixcraft_dict["done_time"]=None
tixcraft_dict["elapsed_time"]=None
tixcraft_dict["is_popup_checkout"] = False
tixcraft_dict["area_retry_count"]=0
# for kktix
kktix_dict = {}

View File

@ -22,7 +22,7 @@ import sys
import threading
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_CONFIG_FILE = "settings.json"

View File

@ -34,7 +34,7 @@ import ssl
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_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"

View File

@ -27,7 +27,7 @@ import pyperclip
import tornado
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"