2024-04-19, update for fantopia
parent
3ebbb31620
commit
64bfa63cbf
|
@ -44,7 +44,7 @@ except Exception as exc:
|
||||||
print(exc)
|
print(exc)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.18)"
|
CONST_APP_VERSION = "MaxBot (2024.04.19)"
|
||||||
|
|
||||||
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"
|
||||||
|
@ -600,6 +600,7 @@ def get_driver_by_config(config_dict):
|
||||||
homepage = config_dict["homepage"]
|
homepage = config_dict["homepage"]
|
||||||
|
|
||||||
# output config:
|
# output config:
|
||||||
|
print("current time:", datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
|
||||||
print("maxbot app version:", CONST_APP_VERSION)
|
print("maxbot app version:", CONST_APP_VERSION)
|
||||||
print("python version:", platform.python_version())
|
print("python version:", platform.python_version())
|
||||||
print("platform:", platform.platform())
|
print("platform:", platform.platform())
|
||||||
|
|
|
@ -24,7 +24,7 @@ import webbrowser
|
||||||
|
|
||||||
import util
|
import util
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.18)"
|
CONST_APP_VERSION = "MaxBot (2024.04.19)"
|
||||||
|
|
||||||
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"
|
||||||
|
|
|
@ -32,7 +32,7 @@ except Exception as exc:
|
||||||
print(exc)
|
print(exc)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.18)"
|
CONST_APP_VERSION = "MaxBot (2024.04.19)"
|
||||||
|
|
||||||
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"
|
||||||
|
@ -490,6 +490,8 @@ async def nodriver_kktix_travel_price_list(tab, config_dict, kktix_area_auto_sel
|
||||||
row_text = ""
|
row_text = ""
|
||||||
|
|
||||||
if not row_input is None:
|
if not row_input is None:
|
||||||
|
is_match_area = False
|
||||||
|
|
||||||
# check ticket input textbox.
|
# check ticket input textbox.
|
||||||
if len(current_ticket_number) > 0:
|
if len(current_ticket_number) > 0:
|
||||||
if current_ticket_number != "0":
|
if current_ticket_number != "0":
|
||||||
|
|
|
@ -39,7 +39,7 @@ try:
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.18)"
|
CONST_APP_VERSION = "MaxBot (2024.04.19)"
|
||||||
|
|
||||||
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"
|
||||||
|
|
|
@ -34,7 +34,7 @@ try:
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
CONST_APP_VERSION = "MaxBot (2024.04.18)"
|
CONST_APP_VERSION = "MaxBot (2024.04.19)"
|
||||||
|
|
||||||
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"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"homepage": "https://kktix.com/events/keswlkfo1/registrations/new", "browser": "chrome", "language": "English", "ticket_number": 2, "ocr_captcha": {"enable": true, "beta": true, "force_submit": true, "image_source": "canvas"}, "webdriver_type": "undetected_chromedriver", "date_auto_select": {"enable": true, "date_keyword": "\"\"", "mode": "random"}, "area_auto_select": {"enable": true, "mode": "random", "area_keyword": "\"\""}, "keyword_exclude": "\"\u8f2a\u6905\",\"\u8eab\u969c\",\"\u8eab\u5fc3 \u969c\u7919\",\"Restricted View\",\"\u71c8\u67f1\u906e\u853d\",\"\u8996\u7dda\u4e0d\u5b8c\u6574\"", "kktix": {"auto_press_next_step_button": true, "auto_fill_ticket_number": true, "kktix_status_api": false, "max_dwell_time": 60}, "cityline": {"cityline_queue_retry": true}, "tixcraft": {"pass_date_is_sold_out": true, "auto_reload_coming_soon_page": true}, "advanced": {"play_sound": {"ticket": true, "order": true, "filename": "ding-dong.wav"}, "tixcraft_sid": "", "ibonqware": "", "facebook_account": "", "kktix_account": "", "fami_account": "", "cityline_account": "", "urbtix_account": "", "hkticketing_account": "", "kham_account": "", "ticket_account": "", "udn_account": "", "ticketplus_account": "", "facebook_password": "", "kktix_password": "", "fami_password": "", "urbtix_password": "", "cityline_password": "", "hkticketing_password": "", "kham_password": "", "ticket_password": "", "udn_password": "", "ticketplus_password": "", "facebook_password_plaintext": "", "kktix_password_plaintext": "", "fami_password_plaintext": "", "urbtix_password_plaintext": "", "cityline_password_plaintext": "", "hkticketing_password_plaintext": "", "kham_password_plaintext": "", "ticket_password_plaintext": "", "udn_password_plaintext": "", "ticketplus_password_plaintext": "", "chrome_extension": true, "disable_adjacent_seat": true, "hide_some_image": true, "block_facebook_network": true, "headless": true, "verbose": true, "auto_guess_options": true, "user_guess_string": "\"\"", "remote_url": "\"http://maxbot.dropboxlike.com:16888/\"", "auto_reload_page_interval": 0.1, "reset_browser_interval": 0, "proxy_server_port": "", "window_size": "480,1024,0", "idle_keyword": "", "resume_keyword": "", "idle_keyword_second": "", "resume_keyword_second": ""}, "domain_filter": ["*.doubleclick.net/*", "*.googlesyndication.com/*", "*.ssp.hinet.net/*", "*a.amnet.tw/*", "*adx.c.appier.net/*", "*cdn.cookielaw.org/*", "*cdnjs.cloudflare.com/ajax/libs/clipboard.js/*", "*clarity.ms/*", "*cloudfront.com/*", "*cms.analytics.yahoo.com/*", "*e2elog.fetnet.net/*", "*fundingchoicesmessages.google.com/*", "*ghtinc.com/*", "*google-analytics.com/*", "*googletagmanager.com/*", "*googletagservices.com/*", "*img.uniicreative.com/*", "*lndata.com/*", "*match.adsrvr.org/*", "*onead.onevision.com.tw/*", "*play.google.com/log?*", "*popin.cc/*", "*rollbar.com/*", "*sb.scorecardresearch.com/*", "*tagtoo.co/*", "*ticketmaster.sg/js/adblock*", "*ticketmaster.sg/js/adblock.js*", "*tixcraft.com/js/analytics.js*", "*tixcraft.com/js/common.js*", "*tixcraft.com/js/custom.js*", "*treasuredata.com/*", "*www.youtube.com/youtubei/v1/player/heartbeat*"]}
|
{"homepage": "about:blank", "browser": "chrome", "language": "English", "ticket_number": 2, "ocr_captcha": {"enable": true, "beta": true, "force_submit": true, "image_source": "canvas"}, "webdriver_type": "undetected_chromedriver", "date_auto_select": {"enable": true, "date_keyword": "", "mode": "random"}, "area_auto_select": {"enable": true, "mode": "random", "area_keyword": ""}, "keyword_exclude": "\"\u8f2a\u6905\",\"\u8eab\u969c\",\"\u8eab\u5fc3 \u969c\u7919\",\"Restricted View\",\"\u71c8\u67f1\u906e\u853d\",\"\u8996\u7dda\u4e0d\u5b8c\u6574\"", "kktix": {"auto_press_next_step_button": true, "auto_fill_ticket_number": true, "max_dwell_time": 60}, "cityline": {"cityline_queue_retry": true}, "tixcraft": {"pass_date_is_sold_out": true, "auto_reload_coming_soon_page": true}, "advanced": {"play_sound": {"ticket": true, "order": true, "filename": "ding-dong.wav"}, "tixcraft_sid": "", "ibonqware": "", "facebook_account": "", "kktix_account": "", "fami_account": "", "cityline_account": "", "urbtix_account": "", "hkticketing_account": "", "kham_account": "", "ticket_account": "", "udn_account": "", "ticketplus_account": "", "facebook_password": "", "kktix_password": "", "fami_password": "", "urbtix_password": "", "cityline_password": "", "hkticketing_password": "", "kham_password": "", "ticket_password": "", "udn_password": "", "ticketplus_password": "", "facebook_password_plaintext": "", "kktix_password_plaintext": "", "fami_password_plaintext": "", "urbtix_password_plaintext": "", "cityline_password_plaintext": "", "hkticketing_password_plaintext": "", "kham_password_plaintext": "", "ticket_password_plaintext": "", "udn_password_plaintext": "", "ticketplus_password_plaintext": "", "chrome_extension": true, "disable_adjacent_seat": false, "hide_some_image": false, "block_facebook_network": false, "headless": false, "verbose": false, "auto_guess_options": true, "user_guess_string": "", "remote_url": "\"http://127.0.0.1:16888/\"", "auto_reload_page_interval": 0.1, "reset_browser_interval": 0, "proxy_server_port": "", "window_size": "480,1024,1", "idle_keyword": "", "resume_keyword": "", "idle_keyword_second": "", "resume_keyword_second": ""}, "domain_filter": ["*.doubleclick.net/*", "*.googlesyndication.com/*", "*.ssp.hinet.net/*", "*a.amnet.tw/*", "*adx.c.appier.net/*", "*cdn.cookielaw.org/*", "*cdnjs.cloudflare.com/ajax/libs/clipboard.js/*", "*clarity.ms/*", "*cloudfront.com/*", "*cms.analytics.yahoo.com/*", "*e2elog.fetnet.net/*", "*fundingchoicesmessages.google.com/*", "*ghtinc.com/*", "*google-analytics.com/*", "*googletagmanager.com/*", "*googletagservices.com/*", "*img.uniicreative.com/*", "*lndata.com/*", "*match.adsrvr.org/*", "*onead.onevision.com.tw/*", "*play.google.com/log?*", "*popin.cc/*", "*rollbar.com/*", "*sb.scorecardresearch.com/*", "*tagtoo.co/*", "*ticketmaster.sg/js/adblock*", "*ticketmaster.sg/js/adblock.js*", "*tixcraft.com/js/analytics.js*", "*tixcraft.com/js/common.js*", "*tixcraft.com/js/custom.js*", "*treasuredata.com/*", "*www.youtube.com/youtubei/v1/player/heartbeat*"]}
|
|
@ -1 +1 @@
|
||||||
{"homepage": "https://kktix.com/events/keswlkfo1/registrations/new", "browser": "chrome", "language": "English", "ticket_number": 2, "ocr_captcha": {"enable": true, "beta": true, "force_submit": true, "image_source": "canvas"}, "webdriver_type": "undetected_chromedriver", "date_auto_select": {"enable": true, "date_keyword": "\"\"", "mode": "random"}, "area_auto_select": {"enable": true, "mode": "random", "area_keyword": "\"\""}, "keyword_exclude": "\"\u8f2a\u6905\",\"\u8eab\u969c\",\"\u8eab\u5fc3 \u969c\u7919\",\"Restricted View\",\"\u71c8\u67f1\u906e\u853d\",\"\u8996\u7dda\u4e0d\u5b8c\u6574\"", "kktix": {"auto_press_next_step_button": true, "auto_fill_ticket_number": true, "kktix_status_api": false, "max_dwell_time": 60}, "cityline": {"cityline_queue_retry": true}, "tixcraft": {"pass_date_is_sold_out": true, "auto_reload_coming_soon_page": true}, "advanced": {"play_sound": {"ticket": true, "order": true, "filename": "ding-dong.wav"}, "tixcraft_sid": "", "ibonqware": "", "facebook_account": "", "kktix_account": "", "fami_account": "", "cityline_account": "", "urbtix_account": "", "hkticketing_account": "", "kham_account": "", "ticket_account": "", "udn_account": "", "ticketplus_account": "", "facebook_password": "", "kktix_password": "", "fami_password": "", "urbtix_password": "", "cityline_password": "", "hkticketing_password": "", "kham_password": "", "ticket_password": "", "udn_password": "", "ticketplus_password": "", "facebook_password_plaintext": "", "kktix_password_plaintext": "", "fami_password_plaintext": "", "urbtix_password_plaintext": "", "cityline_password_plaintext": "", "hkticketing_password_plaintext": "", "kham_password_plaintext": "", "ticket_password_plaintext": "", "udn_password_plaintext": "", "ticketplus_password_plaintext": "", "chrome_extension": true, "disable_adjacent_seat": true, "hide_some_image": true, "block_facebook_network": true, "headless": true, "verbose": true, "auto_guess_options": true, "user_guess_string": "\"\"", "remote_url": "\"http://maxbot.dropboxlike.com:16888/\"", "auto_reload_page_interval": 0.1, "reset_browser_interval": 0, "proxy_server_port": "", "window_size": "480,1024,0", "idle_keyword": "", "resume_keyword": "", "idle_keyword_second": "", "resume_keyword_second": ""}}
|
{"homepage": "about:blank", "browser": "chrome", "language": "English", "ticket_number": 2, "ocr_captcha": {"enable": true, "beta": true, "force_submit": true, "image_source": "canvas"}, "webdriver_type": "undetected_chromedriver", "date_auto_select": {"enable": true, "date_keyword": "", "mode": "random"}, "area_auto_select": {"enable": true, "mode": "random", "area_keyword": ""}, "keyword_exclude": "\"\u8f2a\u6905\",\"\u8eab\u969c\",\"\u8eab\u5fc3 \u969c\u7919\",\"Restricted View\",\"\u71c8\u67f1\u906e\u853d\",\"\u8996\u7dda\u4e0d\u5b8c\u6574\"", "kktix": {"auto_press_next_step_button": true, "auto_fill_ticket_number": true, "max_dwell_time": 60}, "cityline": {"cityline_queue_retry": true}, "tixcraft": {"pass_date_is_sold_out": true, "auto_reload_coming_soon_page": true}, "advanced": {"play_sound": {"ticket": true, "order": true, "filename": "ding-dong.wav"}, "tixcraft_sid": "", "ibonqware": "", "facebook_account": "", "kktix_account": "", "fami_account": "", "cityline_account": "", "urbtix_account": "", "hkticketing_account": "", "kham_account": "", "ticket_account": "", "udn_account": "", "ticketplus_account": "", "facebook_password": "", "kktix_password": "", "fami_password": "", "urbtix_password": "", "cityline_password": "", "hkticketing_password": "", "kham_password": "", "ticket_password": "", "udn_password": "", "ticketplus_password": "", "facebook_password_plaintext": "", "kktix_password_plaintext": "", "fami_password_plaintext": "", "urbtix_password_plaintext": "", "cityline_password_plaintext": "", "hkticketing_password_plaintext": "", "kham_password_plaintext": "", "ticket_password_plaintext": "", "udn_password_plaintext": "", "ticketplus_password_plaintext": "", "chrome_extension": true, "disable_adjacent_seat": false, "hide_some_image": false, "block_facebook_network": false, "headless": false, "verbose": false, "auto_guess_options": true, "user_guess_string": "", "remote_url": "\"http://127.0.0.1:16888/\"", "auto_reload_page_interval": 0.1, "reset_browser_interval": 0, "proxy_server_port": "", "window_size": "480,1024,1", "idle_keyword": "", "resume_keyword": "", "idle_keyword_second": "", "resume_keyword_second": ""}}
|
|
@ -0,0 +1,43 @@
|
||||||
|
const storage = chrome.storage.local;
|
||||||
|
var settings = null;
|
||||||
|
var inputInterval = null;
|
||||||
|
|
||||||
|
function fantopia_fill_main(settings) {
|
||||||
|
if(settings.ticket_number) {
|
||||||
|
let current_ticket_number = parseInt($("input.border-0").val());
|
||||||
|
for(let i=0; i<settings.ticket_number; i++) {
|
||||||
|
current_ticket_number = parseInt($("input.border-0").val());
|
||||||
|
if(current_ticket_number >= settings.ticket_number) break;
|
||||||
|
$('button > img[src="https://p-st.fantopia.io/icon/add.svg"]').click();
|
||||||
|
}
|
||||||
|
// check overflow
|
||||||
|
current_ticket_number = parseInt($("input.border-0").val());
|
||||||
|
if(current_ticket_number > settings.ticket_number) {
|
||||||
|
$('button > img[src="https://p-st.fantopia.io/icon/reduce.svg"]').click();
|
||||||
|
} else {
|
||||||
|
if(current_ticket_number == settings.ticket_number) {
|
||||||
|
$('div.border-t > div.text-right > button.relative > div.flex.items-center.justify-center').click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
storage.get('settings', function (items)
|
||||||
|
{
|
||||||
|
if (items.settings)
|
||||||
|
{
|
||||||
|
settings = items.settings;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
storage.get('status', function (items)
|
||||||
|
{
|
||||||
|
if (items.status && items.status=='ON')
|
||||||
|
{
|
||||||
|
inputInterval= setInterval(() => {
|
||||||
|
fantopia_fill_main(settings);
|
||||||
|
}, 200);
|
||||||
|
} else {
|
||||||
|
//console.log('maxbot status is not ON');
|
||||||
|
}
|
||||||
|
});
|
|
@ -465,7 +465,18 @@
|
||||||
"jquery.min.js",
|
"jquery.min.js",
|
||||||
"js/hncb_fill.js"
|
"js/hncb_fill.js"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matches": [
|
||||||
|
"https://fantopia.io/events-tickets?eventsKey=*"
|
||||||
|
],
|
||||||
|
"run_at": "document_end",
|
||||||
|
"js": [
|
||||||
|
"jquery.min.js",
|
||||||
|
"js/fantopia_fill.js"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
"version": "1.0.26"
|
"version": "1.0.27"
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -19,15 +19,15 @@
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link active" id="readme-tab" data-bs-toggle="tab" data-bs-target="#readme-tab-pane" type="button" role="tab" aria-controls="readme-tab-pane" aria-selected="true">使用需知</button>
|
<button class="nav-link active" id="readme-tab" data-bs-toggle="tab" data-bs-target="#readme-tab-pane" type="button" role="tab" aria-controls="readme-tab-pane" aria-selected="true">使用需知</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link" id="home-tab" data-bs-toggle="tab" data-bs-target="#home-tab-pane" type="button" role="tab" aria-controls="home-tab-pane" aria-selected="false">偏好設定</button>
|
<button class="nav-link" id="home-tab" data-bs-toggle="tab" data-bs-target="#home-tab-pane" type="button" role="tab" aria-controls="home-tab-pane" aria-selected="false">偏好設定</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link" id="advanced-tab" data-bs-toggle="tab" data-bs-target="#advanced-tab-pane" type="button" role="tab" aria-controls="advanced-tab-pane" aria-selected="false">進階設定</button>
|
<button class="nav-link" id="advanced-tab" data-bs-toggle="tab" data-bs-target="#advanced-tab-pane" type="button" role="tab" aria-controls="advanced-tab-pane" aria-selected="false">進階設定</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link" id="verification-tab" data-bs-toggle="tab" data-bs-target="#verification-tab-pane" type="button" role="tab" aria-controls="verification-tab-pane" aria-selected="false">驗證問題</button>
|
<button class="nav-link" id="verification-tab" data-bs-toggle="tab" data-bs-target="#verification-tab-pane" type="button" role="tab" aria-controls="verification-tab-pane" aria-selected="false">驗證問題</button>
|
||||||
</li>
|
</li>
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
<div class="bd-callout bd-callout-info">
|
<div class="bd-callout bd-callout-info">
|
||||||
台灣藝文活動的<strong>文創法第十條</strong>中的「<code>不正方式</code>」由於沒有明確定義,代表的是所有軟體都涉嫌違反。故在此呼籲大家,勿以身試法。
|
台灣藝文活動的<strong>文創法第十條</strong>中的「<code>不正方式</code>」由於沒有明確定義,代表的是所有軟體都涉嫌違反。故在此呼籲大家,勿以身試法。
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
|
|
||||||
<div class="bd-callout bd-callout-info">
|
<div class="bd-callout bd-callout-info">
|
||||||
作者沒有意圖要他人購得的票券進行加價轉售或是使用在違法的事情上,他人的行為並不在作者的意識支配範圍之內,作者不對他人的非法行為負責。
|
作者沒有意圖要他人購得的票券進行加價轉售或是使用在違法的事情上,他人的行為並不在作者的意識支配範圍之內,作者不對他人的非法行為負責。
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
<label for="homepage" class="col-sm-2 col-form-label">網址</label>
|
<label for="homepage" class="col-sm-2 col-form-label">網址</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input class="form-control" id="homepage" value="" />
|
<input class="form-control" id="homepage" value="" />
|
||||||
|
|
||||||
<div class="accordion mt-1" id="accordionExample">
|
<div class="accordion mt-1" id="accordionExample">
|
||||||
<div class="accordion-item">
|
<div class="accordion-item">
|
||||||
<h2 class="accordion-header">
|
<h2 class="accordion-header">
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3 bd-callout bd-callout-info disappear" data-under="cityline">
|
<div class="row mb-3 bd-callout bd-callout-info disappear" data-under="cityline">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<strong>備註:</strong>
|
<strong>備註:</strong>
|
||||||
Cityline 只能使用 <code>chrome 瀏覽器</code> + <code>nodriver</code>。
|
Cityline 只能使用 <code>chrome 瀏覽器</code> + <code>nodriver</code>。
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -226,14 +226,19 @@
|
||||||
<textarea class="form-control" id="area_keyword" rows="3"></textarea>
|
<textarea class="form-control" id="area_keyword" rows="3"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row">
|
||||||
<label for="keyword_exclude" class="col-sm-2 col-form-label">排除關鍵字</label>
|
<label for="keyword_exclude" class="col-sm-2 col-form-label">排除關鍵字</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea class="form-control" id="keyword_exclude" rows="3"></textarea>
|
<textarea class="form-control" id="keyword_exclude" rows="3"></textarea>
|
||||||
<div class="bd-callout bd-callout-info">
|
<div class="bd-callout bd-callout-info">
|
||||||
<strong>提示:</strong>
|
<strong>提示:</strong>
|
||||||
每組關鍵字需要用「<code>雙引號</code>」包起來, 用「<code>逗號</code>」分隔, 在關鍵字中使用「<code>空格</code>」為 AND 邏輯。完全不輸入或是加入 「<code>,""</code>」 代表符合所有關鍵字。
|
每組關鍵字需要用「<code>雙引號</code>」包起來, 用「<code>逗號</code>」分隔, 在關鍵字中使用「<code>空格</code>」為 AND 邏輯。完全不輸入或是加入 「<code>,""</code>」 代表符合所有關鍵字。
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label for="homepage" class="col-sm-2 col-form-label">版本</label>
|
||||||
|
<div class="col-sm-10"><p id="maxbot_version" class="text-secondary mt-2"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -292,7 +297,7 @@
|
||||||
<input class="form-control" id="auto_reload_page_interval" value="" />
|
<input class="form-control" id="auto_reload_page_interval" value="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<label for="reset_browser_interval" class="col-sm-2 col-form-label">重新啟動瀏覽器間隔(秒)</label>
|
<label for="reset_browser_interval" class="col-sm-2 col-form-label">重新啟動瀏覽器間隔(秒)</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
|
@ -529,9 +534,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bd-callout bd-callout-info">
|
<div class="bd-callout bd-callout-info">
|
||||||
<strong>提示:</strong>
|
<strong>提示:</strong>
|
||||||
將密碼保存到設定檔中可能會讓您的密碼被盜。
|
將密碼保存到設定檔中可能會讓您的密碼被盜。
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -601,6 +606,9 @@
|
||||||
<button class="btn btn-primary" id="reset_btn">重設為預設值</button>
|
<button class="btn btn-primary" id="reset_btn">重設為預設值</button>
|
||||||
<button class="btn btn-danger" id="exit_btn">結束</button>
|
<button class="btn btn-danger" id="exit_btn">結束</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<span class="text-danger" id="run_btn_pressed_message"></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal" id="message_modal" tabindex="-1" role="dialog">
|
<div class="modal" id="message_modal" tabindex="-1" role="dialog">
|
||||||
|
|
|
@ -270,6 +270,7 @@ function message_old(msg)
|
||||||
|
|
||||||
function maxbot_launch()
|
function maxbot_launch()
|
||||||
{
|
{
|
||||||
|
run_message("啟動 MaxBot 主程式中...");
|
||||||
save_changes_to_dict(true);
|
save_changes_to_dict(true);
|
||||||
maxbot_save_api(maxbot_run_api());
|
maxbot_save_api(maxbot_run_api());
|
||||||
}
|
}
|
||||||
|
@ -579,6 +580,10 @@ function check_unsaved_fields()
|
||||||
if(special_site.length) {
|
if(special_site.length) {
|
||||||
$('div[data-under="'+ special_site +'"]').removeClass("disappear");
|
$('div[data-under="'+ special_site +'"]').removeClass("disappear");
|
||||||
}
|
}
|
||||||
|
// for cityline.
|
||||||
|
if(homepage.value.indexOf("cityline.com") > 0) {
|
||||||
|
$("#webdriver_type").val("nodriver");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -613,6 +618,23 @@ function maxbot_status_api()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function maxbot_version_api()
|
||||||
|
{
|
||||||
|
let api_url = "http://127.0.0.1:16888/version";
|
||||||
|
$.get( api_url, function() {
|
||||||
|
//alert( "success" );
|
||||||
|
})
|
||||||
|
.done(function(data) {
|
||||||
|
$("#maxbot_version").html(data.version);
|
||||||
|
})
|
||||||
|
.fail(function() {
|
||||||
|
//alert( "error" );
|
||||||
|
})
|
||||||
|
.always(function() {
|
||||||
|
//alert( "finished" );
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function update_system_time()
|
function update_system_time()
|
||||||
{
|
{
|
||||||
var currentdate = new Date();
|
var currentdate = new Date();
|
||||||
|
@ -627,6 +649,8 @@ var status_interval= setInterval(() => {
|
||||||
update_system_time();
|
update_system_time();
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
maxbot_version_api();
|
||||||
|
|
||||||
run_button.addEventListener('click', maxbot_launch);
|
run_button.addEventListener('click', maxbot_launch);
|
||||||
save_button.addEventListener('click', maxbot_save);
|
save_button.addEventListener('click', maxbot_save);
|
||||||
reset_button.addEventListener('click', maxbot_reset_api);
|
reset_button.addEventListener('click', maxbot_reset_api);
|
||||||
|
@ -644,3 +668,16 @@ onchange_tag_list.forEach((tag) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
homepage.addEventListener('keyup', check_unsaved_fields);
|
homepage.addEventListener('keyup', check_unsaved_fields);
|
||||||
|
|
||||||
|
|
||||||
|
let runMessageClearTimer;
|
||||||
|
function run_message(msg)
|
||||||
|
{
|
||||||
|
clearTimeout(runMessageClearTimer);
|
||||||
|
const message = document.querySelector('#run_btn_pressed_message');
|
||||||
|
message.innerText = msg;
|
||||||
|
messageClearTimer = setTimeout(function ()
|
||||||
|
{
|
||||||
|
message.innerText = '';
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue