diff --git a/ElectronJS/README.md b/ElectronJS/README.md index 5f4c99d..0c959a3 100644 --- a/ElectronJS/README.md +++ b/ElectronJS/README.md @@ -25,17 +25,17 @@ chromedriver_mac64 # for mac x64 For example, if you want to build this software on Windows x64 platform, then you should first download a chrome for windows x64, then copy the whole `chrome` folder to this `ElectronJS` folder and rename the folder to `chrome_win64`, assume the chrome version you downloaded is 110; then, download a `chromedriver.exe` with version 110 for windows x64, and put it into the `chrome_win64` folder, then rename it to `chromedriver_win64.exe`. -Finally, copy the `stealth.min.js` file in this folder to all of these `chrome` folders. +Finally, copy the `stealth.min.js` and `execute.bat` (for windows) file in this folder to these `chrome` folders. ## Run Instruction -On Windows, you need to install `VS Build Tools 2017` (double click the vs_BuildTools.exe in this folder, then select and install the `Visual Studio Build Tools 2017` component) first for node-gyp to install `node-windows-manager`. +On Windows, you need to install `VS Build Tools 2017` (https://aka.ms/vs/15/release/vs_buildtools.exe, select and install the `Visual Studio Build Tools 2017` component) first for node-gyp to install `node-windows-manager`. ``` npm install -npm install @electron-forge/cli +npm install @electron-forge/cli -g ``` Then run the software in developing mode: diff --git a/ElectronJS/clean_win32.cmd b/ElectronJS/clean_win32.cmd index 400d113..3160196 100644 --- a/ElectronJS/clean_win32.cmd +++ b/ElectronJS/clean_win32.cmd @@ -2,7 +2,7 @@ move out\EasySpider-win32-ia32 out\EasySpider rmdir /s /q out\EasySpider\resources\app\chrome_win64 rmdir /s /q out\EasySpider\resources\app\Data rmdir /s /q out\EasySpider\resources\app\.idea -rmdir/s /q out\EasySpider\resources\app\tasks +rmdir /s /q out\EasySpider\resources\app\tasks rmdir /s /q out\EasySpider\resources\app\execution_instances rmdir /s /q out\EasySpider\resources\app\user_data rmdir /s /q ..\Releases\EasySpider_windows_386\EasySpider diff --git a/ElectronJS/clean_win64.cmd b/ElectronJS/clean_win64.cmd index 2373bbb..950b256 100644 --- a/ElectronJS/clean_win64.cmd +++ b/ElectronJS/clean_win64.cmd @@ -2,8 +2,8 @@ move out\EasySpider-win32-x64 out\EasySpider rmdir /s /q out\EasySpider\resources\app\chrome_win32 rmdir /s /q out\EasySpider\resources\app\Data rmdir /s /q out\EasySpider\resources\app\.idea -rmdir/s /q out\EasySpider\resources\app\tasks -rmdir/s /q out\EasySpider\resources\app\user_data +rmdir /s /q out\EasySpider\resources\app\tasks +rmdir /s /q out\EasySpider\resources\app\user_data rmdir /s /q out\EasySpider\resources\app\execution_instances rmdir /s /q ..\Releases\EasySpider_windows_amd64\EasySpider del out\EasySpider\resources\app\vs_BuildTools.exe diff --git a/ElectronJS/execute.bat b/ElectronJS/execute.bat new file mode 100644 index 0000000..2c0affa --- /dev/null +++ b/ElectronJS/execute.bat @@ -0,0 +1,6 @@ +@REM msg * %cd% +if exist EasySpider ( + start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 +) else ( + start chrome_win64/easyspider_executestage.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 +) diff --git a/ElectronJS/execution_instances/0.json b/ElectronJS/execution_instances/0.json deleted file mode 100644 index ce24df4..0000000 --- a/ElectronJS/execution_instances/0.json +++ /dev/null @@ -1 +0,0 @@ -{"id":0,"name":"新web采集任务","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"5/19/2023, 2:14:39 AM","containJudge":false,"desc":"https://www.jd.com","inputParameters":[{"id":0,"name":"urlList_0","nodeId":1,"nodeName":"打开网页","value":"https://www.jd.com","desc":"要采集的网址列表,多行以\\n分开","type":"string","exampleValue":"https://www.jd.com"}],"outputParameters":[{"id":0,"name":"自定义操作2","desc":"自定义操作返回的数据","type":"string","exampleValue":""},{"id":1,"name":"自定义操作","desc":"自定义操作返回的数据","type":"string","exampleValue":""}],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1,2],"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0},"isInLoop":false},{"id":1,"index":1,"parentId":0,"type":0,"option":1,"title":"打开网页","sequence":[],"isInLoop":false,"position":0,"parameters":{"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"url":"https://www.jd.com","links":"https://www.jd.com","scrollType":0,"scrollCount":0}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3,4],"isInLoop":false,"position":1,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":0,"scrollCount":0,"loopType":"5","pathList":"","textList":"","code":"dsaf","waitTime":0,"exitCount":0,"historyWait":2}},{"id":3,"index":3,"parentId":2,"type":0,"option":5,"title":"自定义操作2","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"codeMode":0,"code":"return window.innerHeight","waitTime":0,"recordASField":"1"}},{"id":4,"index":4,"parentId":2,"type":0,"option":5,"title":"自定义操作","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":1,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"codeMode":"1","code":"python D:/test.py","waitTime":0,"recordASField":"1"}}]} \ No newline at end of file diff --git a/ElectronJS/package.json b/ElectronJS/package.json index b4acc20..ebc7f07 100644 --- a/ElectronJS/package.json +++ b/ElectronJS/package.json @@ -19,7 +19,7 @@ "demo" ], "author": "Naibo Wang", - "license": "CC0-1.0", + "license": "GPL-3.0", "devDependencies": { "@electron-forge/cli": "^6.0.5", "@electron-forge/maker-deb": "^6.0.5", diff --git a/ElectronJS/start_direct.cmd b/ElectronJS/start_direct.cmd new file mode 100644 index 0000000..f995689 --- /dev/null +++ b/ElectronJS/start_direct.cmd @@ -0,0 +1 @@ +npm run start_direct \ No newline at end of file diff --git a/ElectronJS/vs_BuildTools.exe b/ElectronJS/vs_BuildTools.exe deleted file mode 100644 index f79dffd..0000000 Binary files a/ElectronJS/vs_BuildTools.exe and /dev/null differ