Skip to content

Latest commit

 

History

History

ExecuteStage

环境编译说明/Environment Compilation Instructions

EasySpider分三部分:

  1. 主程序:在ElectronJS文件夹下。
  2. 浏览器扩展:在Extension文件夹下,为浏览器的“操作控制台”的代码。
  3. 执行阶段程序:在ExecuteStage文件夹下。

此部分为执行阶段程序的编译说明。


EasySpider is divided into three parts:

  1. Main program: Located in the ElectronJS folder.
  2. Browser extension: Located in the Extension folder.
  3. Execution stage program: Located in the ExecuteStage folder.

This section covers the compilation instructions for the Execution stage program.

环境构建/Environment Setup

  1. 安装python3.6及以上版本并添加至系统环境变量:https://www.python.org/downloads/

  2. 安装pip3 并添加至系统环境变量(windows安装python后会自带pip,Linux和MacOS安装方式请自行搜索)。

  3. 安装执行阶段需要的依赖库:

         pip3 install -r requirements.txt

  1. Install Python 3.6 or higher version and add it to the system environment variables: https://www.python.org/downloads/.

  2. Install pip3 and add it to the system environment variables. (On Windows, pip is automatically installed with Python. For Linux and macOS, please refer to the appropriate installation instructions).

  3. Install the required dependencies for the execution stage by running:

        pip3 install -r requirements.txt

运行说明/Run Instruction

运行程序前,确保已经完成了ElectronJS文件夹下的编译说明,保证chrome文件夹和chromedriver环境已经就绪,同时EasySpider主程序已在运行中。

在当前文件夹下直接运行程序:

python3 easyspider_executestage.py --id [1]

以上是运行任务号为1的任务的示例命令,更多命令行参数使用说明请参考:https://github.com/NaiboWang/EasySpider/wiki/Argument-Instruction


Before running the program, make sure you have completed the compilation instructions in the ElectronJS folder and ensure that the chrome folder and chromedriver environment are ready. Also, ensure that the EasySpider main program is already running.

To run the program directly in the current folder, use the following command:

python3 easyspider_executestage.py --id [1]

The above is an example command to run a task with the ID of 1. For more information on command-line parameters, please refer to: Argument Instruction on the project's GitHub Wiki.

VS Code调试/VS Code Debug

可以用VS Code打开此文件夹即可调试程序,可修改.vscode下的launch.json文件中的调试参数,调试说明参考:https://zhuanlan.zhihu.com/p/41189402

You can use VS Code to open this folder and debug the program. You can modify the debugging parameters in the launch.json file located under the .vscode folder. For instructions on debugging with VSCode, you can refer to this guide: Debugging Python with Visual Studio Code.

打包说明/Package Instruction

如果想要在主程序直接点击“本地直接运行”按钮即可执行程序,则需要打包程序为可执行程序。

Windows x64直接运行generateEXE_win64.cmd即可把执行阶段程序打包成exe文件并自动拷贝到../ElectronJS/chrome_win64/目录下,其他系统同理。


To execute the program by simply clicking the "Run Locally" button in the main program, you will need to package the program into an executable file.

For Windows x64, you can run the generateEXE_win64.cmd script. This script will package the execution stage program into an .exe file and automatically copy it to the ../ElectronJS/chrome_win64/ directory. The process for other systems is similar.