-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Argument Instruction
Naibo Wang edited this page Jan 2, 2025
·
16 revisions
当使用命令行执行任务时,程序后面的跟的参数说明:
-
--id
:任务执行ID,任务文件存在execution_instances
文件夹内。默认:[0]
。 -
--saved_file_name
:保存文件名称,如不指定则默认为随机数。 -
--read_type
:任务读取方式,remote
为从服务器读取,local
为从本地execution_instances
文件夹直接读取id.json
文件。默认:remote
。如设置成local
则不需要启动EasySpider本体即可直接执行任务。 -
--server_address
:服务器地址,只用于当--read_type
为remote
的情况下,默认值:http://localhost:8074
。 -
--user_data
:是否带用户配置执行任务,1
为是0
为否,默认值0
。 -
--config_file_name
:配置文件名称,默认值:config.json
。配置文件中的absolute_user_data_folder
字段记录了用户的配置目录,如需要带用户配置执行,则需要在配置文件此字段中指定配置目录路径。 -
--config_folder
: 配置文件所在路径,默认为空,即EasySpider根目录。 -
--headless
:是否以无头模式,即不显示浏览器界面执行,1
为是0
为否,默认值0
。 -
--keyboard
:是否要监听键盘以实现暂停功能,如果不监听则无法暂停程序,但适用于Debug或者需要程序执行完成自动退出的情况。1
为是0
为否,默认值1
,适用版本:0.5.0及以上。 -
--pause_key
:暂停/继续任务执行需要长按的键,可在想要多开时修改按键以分别控制不同任务,也可在保存任务窗口中修改。默认值p
,适用版本:0.6.0及以上。 -
--docker_driver
:是否使用docker执行,常用于Linux环境中,如果需要,请指定docker容器地址,如http://localhost:4444/wd/hub
,默认值为空表示不使用docker执行。适用版本:0.6.2及以上 -
--user_folder
:加载指定的用户目录文件夹,注意如果您正在使用docker,此用户文件夹路径应是容器内的路径。默认值为空表示使用系统自带的用户目录。该参数只有当--user_data
参数为1
时生效,适用版本:0.6.3及以上
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 theexecution_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. Useremote
to read from a server orlocal
to directly read theid.json
file from the localexecution_instances
folder. Default:remote
. If set tolocal
, 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 toremote
. Default value:http://localhost:8074
. -
--user_data
: Indicates whether to execute the task with user configuration. Set to1
for yes or0
for no. Default value:0
. -
--config_file_name
: The name of the configuration file. Default value:config.json
. Theabsolute_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 to1
for yes or0
for no. Default value:0
. -
--keyboard
: Determines whether to listen to the keyboard to implement pause functionality. If not listening, the program cannot be paused, but it's suitable for Debug or situations where the program needs to complete execution and exit automatically.1
means "yes",0
means "no". Default value:1
, applicable version: 0.6.0 and above. --pause_key
: The key that needs to be long-pressed to pause/resume task execution. It can be modified to control different tasks separately when you want to run multiple instances, and can also be changed in the save task window. Default value:p
, applicable version: 0.6.0 and above. -
--docker_driver
: Specifies whether to execute using Docker, commonly used in Linux environments. If required, please provide the Docker container address, such ashttp://localhost:4444/wd/hub
. The default value is empty, indicating that Docker is not used for execution. Applicable version: 0.6.2 and above.--user_folder
: Loads the specified user directory folder. Note that if you are using Docker, this directory path should be the path inside the container. The default value is empty, which means it uses the system's default user directory. This parameter only takes effect when the--user_data
parameter is set to1
. Applicable from version 0.6.3 and above.
Click Pages
above to see more pages