Back to Easyspider

任务执行

ElectronJS/src/taskGrid/executeTask.html

0.6.39.6 KB
Original Source

提示:请先获得任务ID!

Hint: Please get EID first!

提示:任务执行ID对应配置文件已更新,您可使用任务ID:来执行加载了新配置的任务。

Hint: The task execution ID corresponds to the configuration file has been updated, you can use the task ID to execute the task with the new configuration.

{{tip | lang}}

{{"Task Execution Instruction~执行任务说明" | lang}}

×

{{Click Here~点击这里 | lang}} {{Here to see argument instruction.~这里查看参数配置说明。 | lang}}{{对于MacOS系统,EasySpider提供了两个不同的执行程序,分别为easyspider_executestage和easyspider_executestage_full,前者执行时加载速度较快,并提供了除OCR识别和数据去重以外的全部功能;后者则提供了包括OCR识别和数据去重在内的全部功能,但运行时加载速度较慢,需要等待2-10分钟才能执行程序,请根据自己的需求选择执行哪个程序。~For MacOS system, EasySpider provides two different execution programs, 'easyspider_executestage' and 'easyspider_executestage_full', the former loads faster when executing, and provides all functions except OCR recognition and data deduplication; the latter provides all functions including OCR recognition and data deduplication, but the loading speed is slower when running, and it takes 2-10 minutes to wait for the program to execute, please choose which program to execute according to your needs. | lang}}{{ Please open a terminal (For Windows, please use PowerShell instead of CMD), go to EasySpider's folder, and then copy (Command/Ctrl + c) the following command to run the task (EasySpider can quit when executing command for ease of timed execution, and you can set --read_type to "remote" for remote execution):~请在EasySpider目录下打开命令行工具Terminal (Windows请使用PowerShell而不是CMD),然后复制(Command/Ctrl + c)和运行以下命令以执行任务(执行命令时可以退出EasySpider以方便定时执行,如需要远程调用则需要将--read_type设置为remote并设置远程地址): | lang }}cd {{easyspider_location}} {{command}} --config_folder "{{config_folder}}" --headless 0 --read_type local --config_file_name config.json --saved_file_name

{{"Read from Excel~从Excel文件读取输入参数" | lang}}

×

{{"Please select an Excel file (.xlsx)请选择一个Excel文件(.xlsx)" | lang}}{{fileUploadStatus | lang}} {{"Upload上传" | lang}} {{"Please design an Excel file (.xlsx) according to the following format and upload it above.~请按照以下格式设计一个Excel文件(.xlsx),并在上方上传:" | lang}}

| {{"Invoke Name 1调用名称1" | lang}} | {{"Invoke Name 2调用名称2" | lang}} | ... | | --- | --- | --- | | {{"Argument Value 1_1参数值1_1" | lang}} | {{"Argument Value 2_1参数值2_1" | lang}} | ... | | {{"Argument Value 1_1参数值1_2" | lang}} | {{"Argument Value 2_1参数值2_2" | lang}} | ... | | ... | ... | ... |

{{"The 'Invoke Name' is shown at the main table of this page, such as 'urlList_0' is the invoke name of the open page operation.~“调用名称”在本页面的主表格中显示,例如“urlList_0”是“打开网页“操作的调用名称。" | lang}}{{"You can just put part of the arguments in the Excel file, and the values of the rest of the arguments will be set to default. Example table for this task is:~您可以只在Excel文件中放入部分参数,其余参数值将被设置为默认值。一个针对此任务的表格示例为:" | lang}}

{{task.inputParameters[i-1]["name"]}}
{{getLine(i,0)}}
{{getLine(i,1)}}
...

对于循环输入文字的参数(loopText)需要配置索引值的情况,即输入文字操作用了相对循环内的索引值,您可以在Excel文件中写同一个参数名写多列,程序将自动合并。 例如,想要设置'loopText_1'参数值两行,分别为"ABC"和"DEF",则Excel文件可以这样设置: For parameters that need to configure the index value of the loop text (loopText), that is, the input text operation uses the index value relative to the loop, you can write multiple columns with the same parameter name in the Excel file, and the program will automatically merge. For example, if you want to set the parameter value of 'loopText_1' to two rows, which are "ABC" and "DEF", the Excel file can be set like this:

inputText_1inputText_1inputText_1
ABC
DEF

{{"Task Execution~任务执行" | lang}}

{{"Task Name:~任务名称:" | lang}} {{task["name"]}}

{{"Task Description:~任务描述:" | lang}} {{task["desc"]}}

{{"API URL (POST):~API 调用网址(POST):" | lang}} {{backEndAddressServiceWrapper}}/invokeTask?id={{task["id"]}}

{{"URL of how to invoke task by API via POST request (Postman or JavaScript): ~通过POST方式进行API调用的示例教程(Postman或JS代码):" | lang}}https://github.com/NaiboWang/EasySpider/wiki/API-Invoke-Example

{{"Read parameters from Excel file~从Excel文件读取输入参数" | lang}}

{{"Please Input Parameters:~请输入参数值:" | lang}}

| ID | {{"Parameter Name参数名称" | lang}} | {{"Invoke Name调用名称" | lang}} | {{"Parameter Type参数类型" | lang}} | {{"Parameter Value参数值(如想对多个网页执行此任务,可在“打开网页”操作内填入多行网址)" | lang}} | | --- | --- | --- | --- | --- | | {{i}} | {{task.inputParameters[i-1]["nodeName"]}} | {{task.inputParameters[i-1]["name"]}} | {{task.inputParameters[i-1]["type"]}} | |

{{"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}}{{"带用户信息模式不能在设计阶段执行,请退出浏览器后点击“执行任务”按钮从执行任务界面执行任务。~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}}

{{要想过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, If the Beta version is not 115, please find the Chrome_Beta_115_win64.7z compressed package in the software download directory, then unzip and copy (overwrite) to the C:\\Program Files\\Google\\Chrome Beta directory. | lang }}

{{"MySQL configuration file Path, relative to this folder:~MySQL配置文件路径,路径相对此文件夹:" | lang}} {{config_folder}} {{"Click the button below to execute the task. Long press the pause button (default: p) on the keyboard to pause the task. Manual intervention is possible during the task execution process, ~点击以下按钮执行任务,任务执行过程中可以长按暂停键(默认:p键)暂停任务的执行以便" | lang }} {{"~人工干预," | lang}} {{"such as manually input a password or captcha: ~如手动输入密码,验证码等。" | lang}}{{"Directly Run Locally (Clean Mode)~本地直接执行(纯净模式)" | lang}} {{"Directly Run Locally (Data Mode)~本地直接执行(带用户信息模式)" | lang}} {{"You can also use the XPath Helper extension to test XPaths when executing the task:执行任务的过程中也可以随时使用XPath Helper扩展来调试XPath。" | lang}}{{"如果想进行更复杂的操作,如设置无头模式,设置定时执行等,请使用下方的命令行执行任务选项并配置好命令行参数。 If you want to perform more complex operations, such as setting headless mode, setting scheduled execution, etc., please use the command line to execute the task and configure the command line parameters below." | lang}} {{"Execution ID (EID), execution files are stored in 'execution_instances' folder, you can write EID by yourself and the set the filename other than 'current_time to append content to the existing file from the EID to achieve incremental collection:~执行ID(执行文件存放在execution_instances文件夹内,提前在下方写好执行ID且文件名不为current_time时可以追加文件内容以实现增量采集):" | lang}}

{{"Hint: Click the "Get Execution ID" button at the bottom to get the task ID, and click the "Execute task by commandline" button at the back to get the prompt command on how to run this task using the command line.~提示:点击下方“获得任务执行ID”按钮得到任务ID,点击后面的“使用命令行执行任务”按钮获得如何使用命令行运行任务的提示命令。" | lang}}

{{"Get Execution ID~获得任务执行ID" | lang}} {{"Execute task by commandline (Clean Mode)~使用命令行执行任务(纯净模式)" | lang}} {{"Execute task by commandline (Data Mode)~使用命令行执行任务(带用户信息模式)" | lang}}