From 322ef1093b4865f8a28aa1956562f5e2a3a70303 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 15 Jan 2024 14:40:44 +0800 Subject: [PATCH] 2024-01-07, just change version code. --- chrome_tixcraft.py | 25 +++++++++++++++++++++++- config_launcher.py | 2 +- settings.py | 2 +- webdriver/Maxbotplus_1.0.0/manifest.json | 2 +- webdriver/Maxbotplus_1.0.0/options.html | 4 ++-- 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/chrome_tixcraft.py b/chrome_tixcraft.py index 242728e..8861aa3 100644 --- a/chrome_tixcraft.py +++ b/chrome_tixcraft.py @@ -41,7 +41,7 @@ try: except Exception as exc: pass -CONST_APP_VERSION = "MaxBot (2024.01.06)" +CONST_APP_VERSION = "MaxBot (2024.01.07)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" @@ -558,6 +558,7 @@ def clean_uc_exe_cache(): return is_cache_exist def dump_settins_to_maxbot_plus_extension(ext, config_dict): + # sync config. target_path = ext target_path = os.path.join(target_path, "data") target_path = os.path.join(target_path, CONST_MAXBOT_CONFIG_FILE) @@ -569,6 +570,7 @@ def dump_settins_to_maxbot_plus_extension(ext, config_dict): with open(target_path, 'w') as outfile: json.dump(config_dict, outfile) + # add host_permissions target_path = ext target_path = os.path.join(target_path, "manifest.json") @@ -601,6 +603,27 @@ def dump_settins_to_maxbot_plus_extension(ext, config_dict): with open(target_path, 'w') as outfile: outfile.write(json_str) + # show advanced rows in extension. + target_path = ext + target_path = os.path.join(target_path, "options.html") + if os.path.isfile(target_path): + file_options = open(target_path, 'r') + html_lines = file_options.readlines() + file_options.close() + new_html_array = [] + my_target_row = ['remote_url_row','ocr_captcha_enable_row'] + for line in html_lines: + for row in my_target_row: + if row in line: + line = line.replace('display: none;','') + new_html_array.append(line) + if len(new_html_array) > 0: + print("output new options.html") + with open(target_path, 'w') as outfile: + outfile.write("".join(new_html_array)) + + + def get_uc_options(uc, config_dict, webdriver_path): options = uc.ChromeOptions() diff --git a/config_launcher.py b/config_launcher.py index fa1923d..423cc5e 100644 --- a/config_launcher.py +++ b/config_launcher.py @@ -22,7 +22,7 @@ import sys import threading import webbrowser -CONST_APP_VERSION = "MaxBot (2024.01.06)" +CONST_APP_VERSION = "MaxBot (2024.01.07)" CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json" CONST_MAXBOT_CONFIG_FILE = "settings.json" diff --git a/settings.py b/settings.py index d7668b1..a317b0c 100644 --- a/settings.py +++ b/settings.py @@ -38,7 +38,7 @@ try: except Exception as exc: pass -CONST_APP_VERSION = "MaxBot (2024.01.06)" +CONST_APP_VERSION = "MaxBot (2024.01.07)" CONST_MAXBOT_ANSWER_ONLINE_FILE = "MAXBOT_ONLINE_ANSWER.txt" CONST_MAXBOT_CONFIG_FILE = "settings.json" diff --git a/webdriver/Maxbotplus_1.0.0/manifest.json b/webdriver/Maxbotplus_1.0.0/manifest.json index 0d06072..ebc8b76 100644 --- a/webdriver/Maxbotplus_1.0.0/manifest.json +++ b/webdriver/Maxbotplus_1.0.0/manifest.json @@ -29,7 +29,7 @@ "declarativeNetRequestFeedback" ], "host_permissions": [ - "http://maxbot.dropboxlike.com:16888/*" + "http://127.0.0.1:16888/*" ], "web_accessible_resources": [ { diff --git a/webdriver/Maxbotplus_1.0.0/options.html b/webdriver/Maxbotplus_1.0.0/options.html index 95b86cb..7b4d5b0 100644 --- a/webdriver/Maxbotplus_1.0.0/options.html +++ b/webdriver/Maxbotplus_1.0.0/options.html @@ -95,7 +95,7 @@ -
+
-
+