2024-04-02 update for cityline.
parent
715377f835
commit
91e509d42c
|
@ -44,7 +44,7 @@ except Exception as exc:
|
||||||
print(exc)
|
print(exc)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.01)"
|
CONST_APP_VERSION = "MaxBot (2024.04.02)"
|
||||||
|
|
||||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
|
|
@ -24,7 +24,7 @@ import webbrowser
|
||||||
|
|
||||||
import util
|
import util
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.01)"
|
CONST_APP_VERSION = "MaxBot (2024.04.02)"
|
||||||
|
|
||||||
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"
|
||||||
|
|
|
@ -29,7 +29,7 @@ from datetime import datetime
|
||||||
|
|
||||||
import util
|
import util
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.01)"
|
CONST_APP_VERSION = "MaxBot (2024.04.02)"
|
||||||
|
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
CONST_MAXBOT_KKTIX_CONFIG_FILE = "kktix.json"
|
CONST_MAXBOT_KKTIX_CONFIG_FILE = "kktix.json"
|
||||||
|
|
|
@ -32,7 +32,7 @@ except Exception as exc:
|
||||||
print(exc)
|
print(exc)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.01)"
|
CONST_APP_VERSION = "MaxBot (2024.04.02)"
|
||||||
|
|
||||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
@ -1605,11 +1605,22 @@ async def nodriver_ibon_main(tab, url, config_dict, ibon_dict, ocr, Captcha_Brow
|
||||||
return ibon_dict
|
return ibon_dict
|
||||||
|
|
||||||
|
|
||||||
async def nodriver_cityline_auto_retry_access(tab, url):
|
async def nodriver_cityline_auto_retry_access(tab, url, config_dict):
|
||||||
try:
|
try:
|
||||||
|
# https://event.cityline.com/utsvInternet/EVENT_NAME/home?lang=TW
|
||||||
|
if "home?lang=TW" in url:
|
||||||
|
url_array = url.split("home?lang=TW")
|
||||||
|
if len(url_array) > 2:
|
||||||
|
new_url = url_array[0] + "home?lang=TW"
|
||||||
|
print("redirect to url:", new_url)
|
||||||
|
tab = await tab.get(new_url)
|
||||||
|
time.sleep(0.1)
|
||||||
|
|
||||||
btn_retry = await tab.query_selector('button')
|
btn_retry = await tab.query_selector('button')
|
||||||
if btn_retry:
|
if btn_retry:
|
||||||
|
#print("found button to click.")
|
||||||
btn_retry.click()
|
btn_retry.click()
|
||||||
|
time.sleep(0.1)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
print(exc)
|
print(exc)
|
||||||
pass
|
pass
|
||||||
|
@ -1785,7 +1796,7 @@ async def nodriver_cityline_close_second_tab(tab, url):
|
||||||
|
|
||||||
async def nodriver_cityline_main(tab, url, config_dict):
|
async def nodriver_cityline_main(tab, url, config_dict):
|
||||||
if 'msg.cityline.com' in url or 'event.cityline.com' in url:
|
if 'msg.cityline.com' in url or 'event.cityline.com' in url:
|
||||||
await nodriver_cityline_auto_retry_access(tab, url)
|
await nodriver_cityline_auto_retry_access(tab, url, config_dict)
|
||||||
|
|
||||||
if 'cityline.com/Login.html' in url:
|
if 'cityline.com/Login.html' in url:
|
||||||
cityline_account = config_dict["advanced"]["cityline_account"]
|
cityline_account = config_dict["advanced"]["cityline_account"]
|
||||||
|
|
|
@ -41,7 +41,7 @@ try:
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.01)"
|
CONST_APP_VERSION = "MaxBot (2024.04.02)"
|
||||||
|
|
||||||
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt"
|
||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
CONST_MAXBOT_CONFIG_FILE = "settings.json"
|
||||||
|
|
|
@ -105,6 +105,7 @@ function cityline_performance()
|
||||||
$('#expressPurchaseBtn').click();
|
$('#expressPurchaseBtn').click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$("#commonWarningMessageModal").hide();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
cityline_performance()
|
cityline_performance()
|
||||||
|
|
|
@ -320,7 +320,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"matches": [
|
"matches": [
|
||||||
"https://msg.cityline.com/*",
|
"https://msg.cityline.com/*.html*",
|
||||||
"https://*.cityline.com/utsvInternet/*/home?lang=TW",
|
"https://*.cityline.com/utsvInternet/*/home?lang=TW",
|
||||||
"https://event.cityline.com/",
|
"https://event.cityline.com/",
|
||||||
"https://event.cityline.com/queue?loc=*"
|
"https://event.cityline.com/queue?loc=*"
|
||||||
|
@ -432,5 +432,5 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version": "1.0.22"
|
"version": "1.0.23"
|
||||||
}
|
}
|
Loading…
Reference in New Issue