Change UI

This commit is contained in:
naibo
2023-07-07 07:11:08 +08:00
parent 741e3c4165
commit dbab4e5055
8 changed files with 20 additions and 13 deletions
+1 -1
View File
@@ -1 +1 @@
{"webserver_address":"http://localhost","webserver_port":8074,"user_data_folder":"./user_data","debug":false,"mysql_config_path":"./mysql_config.json","absolute_user_data_folder":"D:\\Document\\Projects\\EasySpider\\ElectronJS\\user_data"}
{"webserver_address":"http://localhost","webserver_port":8074,"user_data_folder":"./user_data","debug":false,"mysql_config_path":"./mysql_config.json","absolute_user_data_folder":"D:\\Documents\\Projects\\EasySpider\\ElectronJS\\user_data"}
+1 -1
View File
@@ -543,8 +543,8 @@
<input onkeydown="inputDelete(event)" id="serviceDescription" name="serviceDescription" class="form-control"></input>
<label>导出数据格式(Excel/CSV/TXT/数据库):</label>
<select id="outputFormat" class="form-control">
<option value = "csv">CSV</option>
<option value = "xlsx">XLSXEXCEL</option>
<option value = "csv">CSV</option>
<option value = "txt">TXT</option>
<option value = "mysql">MySQL数据库</option>
</select>
+1
View File
@@ -14,6 +14,7 @@ let root = {
useLoop: false, //是否使用循环中的元素
xpath: "", //xpath
wait: 0,
waitType: 0,
},
isInLoop: false, //是否处于循环内
};
+1 -1
View File
@@ -209,7 +209,7 @@
<input type="text" class="form-control" v-model="user_data_folder"></input>
</div>
<div class="form-group" style="margin-top: 10px" v-if="task.outputFormat=='mysql'">
<label>{{"Mysql configuration file Path:~Mysql配置文件路径:" | lang}}</label>
<label>{{"MySQL configuration file Path:~MySQL配置文件路径:" | lang}}</label>
<input type="text" class="form-control" v-model="mysql_config_path"></input>
</div>
</form>
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -12,7 +12,7 @@
"justMyCode": true,
// "args": ["--id", "[7]", "--read_type", "remote", "--headless", "0"]
// "args": ["--id", "[9]", "--read_type", "remote", "--headless", "0", "--saved_file_name", "YOUTUBE"]
"args": ["--id", "[21]", "--headless", "0", "--user_data", "1"]
"args": ["--id", "[22]", "--headless", "0", "--user_data", "1"]
}
]
}
+3 -1
View File
@@ -1458,4 +1458,6 @@ if __name__ == '__main__':
for thread in threads:
thread.browser.quit()
print("Thread with task id: ", thread.id, " is closed")
# print("Thread with task id: ", thread.id, " is closed")
print("程序已运行完成,请手动关闭此窗口。")
print("The program has finished running, please manually close this window.")
+11 -7
View File
@@ -144,13 +144,17 @@ class Time:
class myMySQL:
def __init__(self, config_file="mysql_config.json"):
# 读取配置文件
with open(config_file, 'r') as f:
config = json.load(f)
host = config["host"]
port = config["port"]
user = config["user"]
passwd = config["password"]
db = config["database"]
try:
with open(config_file, 'r') as f:
config = json.load(f)
host = config["host"]
port = config["port"]
user = config["user"]
passwd = config["password"]
db = config["database"]
except:
print("读取配置文件失败,请检查配置文件:"+config_file+"是否存在。")
print("Failed to read configuration file, please check if the configuration file: "+config_file+" exists.")
try:
self.conn = pymysql.connect(
host=host, port=port, user=user, passwd=passwd, db=db)