自動刷新時隨機延遲
parent
d160278028
commit
fbb04cf44d
|
@ -54,7 +54,7 @@ import itertools
|
|||
import ssl
|
||||
ssl._create_default_https_context = ssl._create_unverified_context
|
||||
|
||||
CONST_APP_VERSION = "MaxBot (2023.6.11)"
|
||||
CONST_APP_VERSION = "MaxBot (2023.6.12)"
|
||||
|
||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||
CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
|
||||
|
@ -87,6 +87,7 @@ CONST_OCR_CAPTCH_IMAGE_SOURCE_CANVAS = "canvas"
|
|||
CONST_WEBDRIVER_TYPE_SELENIUM = "selenium"
|
||||
#CONST_WEBDRIVER_TYPE_STEALTH = "stealth"
|
||||
CONST_WEBDRIVER_TYPE_UC = "undetected_chromedriver"
|
||||
CONST_AUTO_RELOAD_RANDOM_DELAY_MAX_SECOND = 4
|
||||
|
||||
|
||||
def t_or_f(arg):
|
||||
|
@ -1705,6 +1706,9 @@ def tixcraft_date_auto_select(driver, url, config_dict, domain_name):
|
|||
except Exception as exc:
|
||||
pass
|
||||
|
||||
if config_dict["advanced"]["auto_reload_random_delay"]:
|
||||
time.sleep(random.randint(0,CONST_AUTO_RELOAD_RANDOM_DELAY_MAX_SECOND))
|
||||
|
||||
return is_date_clicked
|
||||
|
||||
def ticketmaster_date_auto_select(driver, url, config_dict, domain_name):
|
||||
|
@ -2130,6 +2134,9 @@ def tixcraft_area_auto_select(driver, url, config_dict):
|
|||
except Exception as exc:
|
||||
pass
|
||||
|
||||
if config_dict["advanced"]["auto_reload_random_delay"]:
|
||||
time.sleep(random.randint(0,CONST_AUTO_RELOAD_RANDOM_DELAY_MAX_SECOND))
|
||||
|
||||
'''
|
||||
el_selectSeat_iframe = None
|
||||
try:
|
||||
|
@ -3966,6 +3973,9 @@ def kktix_reg_new_main(driver, config_dict, answer_index, is_finish_checkbox_cli
|
|||
#print("refresh fail")
|
||||
pass
|
||||
|
||||
if config_dict["advanced"]["auto_reload_random_delay"]:
|
||||
time.sleep(random.randint(0,CONST_AUTO_RELOAD_RANDOM_DELAY_MAX_SECOND))
|
||||
|
||||
return answer_index
|
||||
|
||||
def kktix_reg_new(driver, url, answer_index, kktix_register_status_last, config_dict):
|
||||
|
@ -4001,6 +4011,9 @@ def kktix_reg_new(driver, url, answer_index, kktix_register_status_last, config_
|
|||
#print("refresh fail")
|
||||
pass
|
||||
|
||||
if config_dict["advanced"]["auto_reload_random_delay"]:
|
||||
time.sleep(random.randint(0,CONST_AUTO_RELOAD_RANDOM_DELAY_MAX_SECOND))
|
||||
|
||||
# reset answer_index
|
||||
answer_index = -1
|
||||
registerStatus = None
|
||||
|
@ -5692,9 +5705,13 @@ def ibon_date_auto_select(driver, config_dict):
|
|||
if len(formated_area_list) == 0:
|
||||
try:
|
||||
driver.refresh()
|
||||
time.sleep(0.4)
|
||||
time.sleep(0.3)
|
||||
except Exception as exc:
|
||||
pass
|
||||
|
||||
if config_dict["advanced"]["auto_reload_random_delay"]:
|
||||
time.sleep(random.randint(0,CONST_AUTO_RELOAD_RANDOM_DELAY_MAX_SECOND))
|
||||
|
||||
return ret
|
||||
|
||||
def ibon_area_auto_select(driver, config_dict, area_keyword_list):
|
||||
|
@ -5980,6 +5997,10 @@ def ibon_performance(driver, config_dict):
|
|||
except Exception as exc:
|
||||
pass
|
||||
|
||||
if config_dict["advanced"]["auto_reload_random_delay"]:
|
||||
time.sleep(random.randint(0,CONST_AUTO_RELOAD_RANDOM_DELAY_MAX_SECOND))
|
||||
|
||||
|
||||
return is_price_assign_by_bot
|
||||
|
||||
def ibon_purchase_button_press(driver):
|
||||
|
|
Loading…
Reference in New Issue