2023-12-09

master
CHUN YU YAO 2023-12-15 00:31:44 +08:00
parent a9bcce7f96
commit bf11afef6d
4 changed files with 55 additions and 44 deletions

View File

@ -53,7 +53,7 @@ import webbrowser
import chromedriver_autoinstaller import chromedriver_autoinstaller
CONST_APP_VERSION = "MaxBot (2023.12.08)" CONST_APP_VERSION = "MaxBot (2023.12.09)"
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"
@ -10853,6 +10853,7 @@ def ticketplus_date_auto_select(driver, config_dict):
matched_blocks = None matched_blocks = None
formated_area_list = None formated_area_list = None
is_vue_ready = True
if not area_list is None: if not area_list is None:
area_list_count = len(area_list) area_list_count = len(area_list)
@ -10878,6 +10879,12 @@ def ticketplus_date_auto_select(driver, config_dict):
if reset_row_text_if_match_keyword_exclude(config_dict, row_text): if reset_row_text_if_match_keyword_exclude(config_dict, row_text):
row_text = "" row_text = ""
if len(row_text) > 0:
if '<div class="v-progress-circular__info"></div>' in row_html:
# vue not applied.
is_vue_ready = False
break
if len(row_text) > 0: if len(row_text) > 0:
row_is_enabled=False row_is_enabled=False
for text_item in find_ticket_text_list: for text_item in find_ticket_text_list:
@ -10921,8 +10928,9 @@ def ticketplus_date_auto_select(driver, config_dict):
print("date date-time-position is None") print("date date-time-position is None")
pass pass
target_area = get_target_item_from_matched_list(matched_blocks, auto_select_mode)
is_date_clicked = False is_date_clicked = False
if is_vue_ready:
target_area = get_target_item_from_matched_list(matched_blocks, auto_select_mode)
if not target_area is None: if not target_area is None:
target_button = None target_button = None
try: try:
@ -11065,17 +11073,20 @@ def ticketplus_order_expansion_auto_select(driver, config_dict, area_keyword_ite
# not found closed-folder button, try scan opened-text-title. # not found closed-folder button, try scan opened-text-title.
if show_debug_message: if show_debug_message:
print("not found closed-folder button, try scan opened-text-title") print("not found closed-folder button, try scan opened-text-title")
my_css_selector = 'div.price-group > div'
price_group_list = driver.find_elements(By.CSS_SELECTOR, my_css_selector)
if len(price_group_list) > 0:
# price group style.
my_css_selector = 'div.seats-area > div.v-expansion-panel'
area_list = driver.find_elements(By.CSS_SELECTOR, my_css_selector)
else:
# no price group style.
my_css_selector = 'div.seats-area > div.v-expansion-panel[aria-expanded="false"]' my_css_selector = 'div.seats-area > div.v-expansion-panel[aria-expanded="false"]'
area_list = driver.find_elements(By.CSS_SELECTOR, my_css_selector) area_list = driver.find_elements(By.CSS_SELECTOR, my_css_selector)
# triger re-query again.
is_click_on_folder = True is_click_on_folder = True
if len(area_list)==1:
my_css_selector = 'div.seats-area > div.v-expansion-panel[aria-expanded="true"]'
area_list_parent = driver.find_elements(By.CSS_SELECTOR, my_css_selector)
if len(area_list_parent) > 0:
# change keyword to match all.
area_keyword_item = ""
except Exception as exc: except Exception as exc:
if current_layout_style == 1: if current_layout_style == 1:
print("find .v-expansion-panels date list fail") print("find .v-expansion-panels date list fail")

View File

@ -22,7 +22,7 @@ import sys
import threading import threading
import webbrowser import webbrowser
CONST_APP_VERSION = "MaxBot (2023.12.08)" CONST_APP_VERSION = "MaxBot (2023.12.09)"
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"

View File

@ -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.08)" CONST_APP_VERSION = "MaxBot (2023.12.09)"
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"

View File

@ -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.08)" CONST_APP_VERSION = "MaxBot (2023.12.09)"
CONST_MAXBOT_QUESTION_FILE = "MAXBOT_QUESTION.txt" CONST_MAXBOT_QUESTION_FILE = "MAXBOT_QUESTION.txt"