finetune for kham

master
CHUN YU YAO 2023-02-25 12:35:07 +08:00
parent 6011972cb1
commit 9ed628ee56
1 changed files with 27 additions and 20 deletions

View File

@ -7250,7 +7250,18 @@ def kham_area_auto_select(driver, area_auto_select_mode, area_keyword_1, area_ke
row_index = 0
for row in area_list:
row_index += 1
row_is_sold_out=False
try:
row_text = row.text
if row_text is None:
row_text = ""
if '售完' in row_text:
row_is_sold_out = True
except Exception as exc:
pass
row_is_enabled=False
if not row_is_sold_out:
try:
is_row_with_id = False
tr_id_string = str(row.get_attribute('id'))
@ -7266,11 +7277,7 @@ def kham_area_auto_select(driver, area_auto_select_mode, area_keyword_1, area_ke
if int(remaining_value) >= ticket_number:
row_is_enabled=True
else:
# text directly allow.
row_is_enabled=True
if '售完' in remaining_value:
row_is_enabled=False
except Exception as exc:
pass