UI Update

This commit is contained in:
naibo 2023-12-22 00:52:00 +08:00
parent ebbb8a5356
commit 0cba205bbb
6 changed files with 16 additions and 5 deletions

View File

@ -13,3 +13,4 @@ mysql_config.json
**/user_data
**/tasks
**/execution_instances
**/TempUserDataFolder

Binary file not shown.

Binary file not shown.

View File

@ -80,7 +80,7 @@ For individual users, EasySpider is a completely free and ad-free open-source so
<p><a @click="startInvoke('en')"
@click class="btn btn-primary btn-lg"
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">View/Manage/Invoke
style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;color:white">View/Manage/Execute
Tasks</a></p>
<p>
<a href="https://www.easyspider.cn/index_english.html" target="_blank" style="text-align: center; font-size: 18px">Browse official website to watch tutorials</a>

View File

@ -243,6 +243,7 @@
</table>
<div class="form-group" style="margin-top: 10px">
<label>{{"User Data Folder (If you want to load the cookie, data and extension(s) from your local browser, please set this folder path, and then cilck the 'Run with (Data Mode)' button to run the task):~用户本地浏览器数据目录如果需要使用本地的登录信息插件和cookie请设置此目录并点击下方“执行带用户信息模式”按钮开始执行任务" | lang}}</label>
<label v-if="type!=1"><b>{{"带用户信息模式不能在设计阶段执行,请退出浏览器后点击“执行任务”按钮从执行任务界面执行任务。~The 'Run Locally (Data Mode)' button is not available in the design stage, please exit the browser and click the 'Execute task' button to execute the task from the execution task page." | lang}}</b></label>
<input type="text" class="form-control" v-model="user_data_folder"></input>
</div>
<p v-if="task['cloudflare']==1">{{`要想过Cloudflare验证需要以下目录存在115版本的Chrome Beta版浏览器注意是Beta版不是正式版C:\\Program Files\\Google\\Chrome Beta。如果Beta版本不是115请在软件下载目录中找到Chrome_Beta_115_win64.7z压缩包然后解压并复制覆盖为C:\\Program Files\\Google\\Chrome Beta目录即可。~To pass the Cloudflare verification, you need the following directory to exist in the 115 version of Chrome Beta, note that it is the Beta version not the official version: C:\\Program Files\\Google\\Chrome Beta,
@ -302,6 +303,7 @@
show: false, //是否渲染
ID: "",
lang: getUrlParam("lang"),
type: getUrlParam("type"),
tip: "The parameter values in the Excel file have been successfully imported into the corresponding field text box~Excel文件中的参数值已成功导入到对应字段文本框中",
file:null,
user_data_folder:"",

View File

@ -2258,13 +2258,21 @@ if __name__ == '__main__':
tmp_user_data_folder = os.path.join(tmp_user_folder_parent, "user_data_" + str(id) + "_" + str(time.time()).replace(".","") + "_" + random_string)
tmp_options[i]["tmp_user_data_folder"] = tmp_user_data_folder
if os.path.exists(tmp_user_data_folder):
shutil.rmtree(tmp_user_data_folder)
try:
shutil.rmtree(tmp_user_data_folder)
except:
pass
print(f"Copying user data folder to: {tmp_user_data_folder}, please wait...")
print(f"正在复制用户信息目录到: {tmp_user_data_folder},请稍等...")
if os.path.exists(absolute_user_data_folder):
shutil.copytree(absolute_user_data_folder, tmp_user_data_folder)
print("User data folder copied successfully, if you exit the program before it finishes, please delete the temporary user data folder manually.")
print("用户信息目录复制成功,如果程序在运行过程中被手动退出,请手动删除临时用户信息目录。")
try:
shutil.copytree(absolute_user_data_folder, tmp_user_data_folder)
print("User data folder copied successfully, if you exit the program before it finishes, please delete the temporary user data folder manually.")
print("用户信息目录复制成功,如果程序在运行过程中被手动退出,请手动删除临时用户信息目录。")
except:
tmp_user_data_folder = absolute_user_data_folder
print("Copy user data folder failed, use the original folder.")
print("复制用户信息目录失败,使用原始目录。")
else:
tmp_user_data_folder = absolute_user_data_folder
print("Cannot find user data folder, create a new folder.")