Skip to content

Argument Instruction

Naibo Wang edited this page May 26, 2023 · 14 revisions

命令行参数说明

当使用命令行执行任务时,程序后面的跟的参数说明:

  • --id:任务执行ID,任务文件存在execution_instances文件夹内。默认:[0]
  • --saved_file_name:保存文件名称,如不指定则默认为随机数。
  • --read_type:任务读取方式,remote为从服务器读取,local为从本地execution_instances文件夹直接读取id.json文件。默认:remote。如设置成local则不需要启动EasySpider本体即可直接执行任务。
  • --server_address:服务器地址,只用于当--read_typeremote的情况下,默认值:http://localhost:8074
  • --user_data:是否带用户配置执行任务,1为是0为否,默认值0
  • --config_file_name:配置文件名称,默认值:config.json。配置文件中的absolute_user_data_folder字段记录了用户的配置目录,如需要带用户配置执行,则需要在配置文件此字段中指定配置目录路径。
  • --config_folder: 配置文件所在路径,默认为空,即EasySpider根目录。
  • --headless:是否以无头模式,即不显示浏览器界面执行,1为是0为否,默认值0

Command Line Arguments Explanation

When executing a task from the command line, the program may accept the following arguments:

  • --id: Task execution ID. The task file is stored in the execution_instances folder. Default: 0.
  • --saved_file_name: The name of the saved file. If not specified, it defaults to a random number.
  • --read_type: Task reading type. Use remote to read from a server or local to directly read the id.json file from the local execution_instances folder. Default: remote. If set to local, the EasySpider ontology does not need to be started to execute the task directly.
  • --server_address: The server address. Only used when --read_type is set to remote. Default value: http://localhost:8074.
  • --user_data: Indicates whether to execute the task with user configuration. Set to 1 for yes or 0 for no. Default value: 0.
  • --config_file_name: The name of the configuration file. Default value: config.json. The absolute_user_data_folder field in the configuration file records the user's configuration directory. If executing the task with user configuration, specify the configuration directory path in this field of the configuration file.
  • --config_folder: The path to the configuration file. The default is empty, which means the EasySpider root directory.
  • --headless: Indicates whether to run in headless mode, i.e., without displaying the browser interface. Set to 1 for yes or 0 for no. Default value: 0.
Clone this wiki locally