2023-05-19, fix for ibon.

master
Max 2023-05-20 23:06:07 +08:00 committed by GitHub
parent 3387cd32bc
commit 73bdc68107
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 6 deletions

View File

@ -54,7 +54,7 @@ import itertools
import ssl import ssl
ssl._create_default_https_context = ssl._create_unverified_context ssl._create_default_https_context = ssl._create_unverified_context
CONST_APP_VERSION = u"MaxBot (2023.05.18)" CONST_APP_VERSION = u"MaxBot (2023.05.19)"
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"
@ -7566,7 +7566,19 @@ def ibon_main(driver, url, config_dict, ibon_dict, ocr, Captcha_Browser):
if is_event_page: if is_event_page:
area_auto_select_enable = config_dict["tixcraft"]["area_auto_select"]["enable"] area_auto_select_enable = config_dict["tixcraft"]["area_auto_select"]["enable"]
if area_auto_select_enable: if area_auto_select_enable:
is_do_ibon_performance_with_ticket_number = False
if 'PRODUCT_ID=' in url:
# step 1: select area.
is_match_target_feature = True
is_price_assign_by_bot = ibon_performance(driver, config_dict)
if not is_price_assign_by_bot:
is_do_ibon_performance_with_ticket_number = True
if 'PERFORMANCE_PRICE_AREA_ID=' in url: if 'PERFORMANCE_PRICE_AREA_ID=' in url:
is_do_ibon_performance_with_ticket_number = True
if is_do_ibon_performance_with_ticket_number:
# captcha # captcha
domain_name = url.split('/')[2] domain_name = url.split('/')[2]
@ -7596,11 +7608,6 @@ def ibon_main(driver, url, config_dict, ibon_dict, ocr, Captcha_Browser):
driver.back() driver.back()
driver.refresh() driver.refresh()
if 'PRODUCT_ID=' in url:
# step 1: select area.
is_match_target_feature = True
ibon_performance(driver, config_dict)
if not is_match_target_feature: if not is_match_target_feature:
#https://orders.ibon.com.tw/application/UTK02/UTK0206_.aspx #https://orders.ibon.com.tw/application/UTK02/UTK0206_.aspx
if 'orders.ibon.com.tw/application/UTK02/UTK020' in url and '.aspx' in url: if 'orders.ibon.com.tw/application/UTK02/UTK020' in url and '.aspx' in url: