diff --git a/.temp_to_pub/compress.py b/.temp_to_pub/compress.py index 877be19..4b5b1a1 100644 --- a/.temp_to_pub/compress.py +++ b/.temp_to_pub/compress.py @@ -63,7 +63,7 @@ def compress_folder_to_7z_split(folder_path, output_file): except: subprocess.call(["7zz", "a", "-v95m", output_file, folder_path]) -easyspider_version = "0.5.0" +easyspider_version = "0.6.0" if __name__ == "__main__": @@ -81,8 +81,8 @@ if __name__ == "__main__": os.remove("./EasySpider_windows_x64/mysql_config.json") os.mkdir("./EasySpider_windows_x64/Data") os.mkdir("./EasySpider_windows_x64/execution_instances") - compress_folder_to_7z_split("./EasySpider_windows_x64", file_name) - print(f"Compress {file_name} Split successfully!") + # compress_folder_to_7z_split("./EasySpider_windows_x64", file_name) + # print(f"Compress {file_name} Split successfully!") compress_folder_to_7z("./EasySpider_windows_x64", file_name) print(f"Compress {file_name} successfully!") elif sys.platform == "win32" and platform.architecture()[0] == "32bit": @@ -99,8 +99,8 @@ if __name__ == "__main__": os.remove("./EasySpider_windows_x32/mysql_config.json") os.mkdir("./EasySpider_windows_x32/Data") os.mkdir("./EasySpider_windows_x32/execution_instances") - compress_folder_to_7z_split("./EasySpider_windows_x32", file_name) - print(f"Compress {file_name} Split successfully!") + # compress_folder_to_7z_split("./EasySpider_windows_x32", file_name) + # print(f"Compress {file_name} Split successfully!") compress_folder_to_7z("./EasySpider_windows_x32", file_name) print(f"Compress {file_name} successfully!") elif sys.platform == "linux" and platform.architecture()[0] == "64bit": @@ -129,6 +129,6 @@ if __name__ == "__main__": shutil.rmtree("./EasySpider_MacOS_all_arch/Data") os.mkdir("./EasySpider_MacOS_all_arch/Data") subprocess.call(["tar", "-zcvf", file_name, "./EasySpider_MacOS_all_arch"]) - subprocess.call(["7zz", "a", "-v95m", file_name.replace(".tar.gz", ".7z"), file_name, "请继续解压EasySpider_MacOS_all_arch.tar.gz使用.txt"]) + # subprocess.call(["7zz", "a", "-v95m", file_name.replace(".tar.gz", ".7z"), file_name, "请继续解压EasySpider_MacOS_all_arch.tar.gz使用.txt"]) print(f"Compress {file_name} successfully!") diff --git a/ElectronJS/change_version.py b/ElectronJS/change_version.py index 7bd6d31..1c1b5c5 100644 --- a/ElectronJS/change_version.py +++ b/ElectronJS/change_version.py @@ -30,7 +30,7 @@ def update_file_version(file_path, new_version, key="当前版本/Current Versio file.write(line) -version = "0.5.0" +version = "0.6.0" # py html js diff --git a/ElectronJS/package-lock.json b/ElectronJS/package-lock.json index cfe2a9d..1703d80 100644 --- a/ElectronJS/package-lock.json +++ b/ElectronJS/package-lock.json @@ -1,12 +1,12 @@ { "name": "easy-spider", - "version": "0.5.0", + "version": "0.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "easy-spider", - "version": "0.5.0", + "version": "0.6.0", "license": "AGPL-3.0", "dependencies": { "cors": "^2.8.5", @@ -26,7 +26,7 @@ "@electron-forge/maker-rpm": "^6.0.5", "@electron-forge/maker-squirrel": "^6.0.5", "@electron-forge/maker-zip": "^6.0.5", - "electron": "^20.0.1" + "electron": "^27.1.3" } }, "node_modules/@electron-forge/cli": { @@ -1676,17 +1676,6 @@ "typedarray": "^0.0.6" } }, - "node_modules/config-chain": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", - "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", - "dev": true, - "optional": true, - "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, "node_modules/console-control-strings": { "version": "1.1.0", "dev": true, @@ -1977,12 +1966,6 @@ "minimatch": "^3.0.4" } }, - "node_modules/duplexer3": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", - "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", - "dev": true - }, "node_modules/eastasianwidth": { "version": "0.2.0", "dev": true, @@ -1994,21 +1977,21 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron": { - "version": "20.3.12", - "resolved": "https://registry.npmjs.org/electron/-/electron-20.3.12.tgz", - "integrity": "sha512-CuCZKhwdSXaUNIoEuPVZ25YH18zmox3wEM8Acwcy9tlpD8Jiuq3ji3RZ98eVWJalrpqbdE9LtTD/sLC86GIkLg==", + "version": "27.1.3", + "resolved": "https://registry.npmjs.org/electron/-/electron-27.1.3.tgz", + "integrity": "sha512-7eD8VMhhlL5J531OOawn00eMthUkX1e3qN5Nqd7eMK8bg5HxQBrn8bdPlvUEnCano9KhrVwaDnGeuzWoDOGpjQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@electron/get": "^1.14.1", - "@types/node": "^16.11.26", + "@electron/get": "^2.0.0", + "@types/node": "^18.11.18", "extract-zip": "^2.0.1" }, "bin": { "electron": "cli.js" }, "engines": { - "node": ">= 10.17.0" + "node": ">= 12.20.55" } }, "node_modules/electron-installer-common": { @@ -2176,226 +2159,6 @@ "node": ">= 4.0.0" } }, - "node_modules/electron/node_modules/@electron/get": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@electron/get/-/get-1.14.1.tgz", - "integrity": "sha512-BrZYyL/6m0ZXz/lDxy/nlVhQz+WF+iPS6qXolEU8atw7h6v1aYkjwJZ63m+bJMBTxDE66X+r2tPS4a/8C82sZw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "env-paths": "^2.2.0", - "fs-extra": "^8.1.0", - "got": "^9.6.0", - "progress": "^2.0.3", - "semver": "^6.2.0", - "sumchecker": "^3.0.1" - }, - "engines": { - "node": ">=8.6" - }, - "optionalDependencies": { - "global-agent": "^3.0.0", - "global-tunnel-ng": "^2.7.1" - } - }, - "node_modules/electron/node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/electron/node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/electron/node_modules/@types/node": { - "version": "16.18.38", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.38.tgz", - "integrity": "sha512-6sfo1qTulpVbkxECP+AVrHV9OoJqhzCsfTNp5NIG+enM4HyM3HvZCO798WShIXBN0+QtDIcutJCjsVYnQP5rIQ==", - "dev": true - }, - "node_modules/electron/node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/electron/node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/electron/node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, - "node_modules/electron/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/electron/node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/electron/node_modules/got/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/electron/node_modules/got/node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron/node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", - "dev": true - }, - "node_modules/electron/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/electron/node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.0" - } - }, - "node_modules/electron/node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/electron/node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/electron/node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", - "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, - "node_modules/electron/node_modules/responselike/node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/electron/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/emoji-regex": { "version": "8.0.0", "dev": true, @@ -3154,22 +2917,6 @@ "which": "bin/which" } }, - "node_modules/global-tunnel-ng": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz", - "integrity": "sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==", - "dev": true, - "optional": true, - "dependencies": { - "encodeurl": "^1.0.2", - "lodash": "^4.17.10", - "npm-conf": "^1.1.3", - "tunnel": "^0.0.6" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/globalthis": { "version": "1.0.3", "dev": true, @@ -4296,30 +4043,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/npm-conf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", - "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", - "dev": true, - "optional": true, - "dependencies": { - "config-chain": "^1.1.11", - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-conf/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=4" - } - }, "node_modules/npm-run-path": { "version": "2.0.2", "dev": true, @@ -4728,15 +4451,6 @@ "node": ">=6" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/process-nextick-args": { "version": "2.0.1", "license": "MIT" @@ -4761,13 +4475,6 @@ "node": ">=10" } }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true, - "optional": true - }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -5632,15 +5339,6 @@ "tmp": "^0.2.0" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "dev": true, @@ -5689,16 +5387,6 @@ "dev": true, "license": "0BSD" }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, "node_modules/type-fest": { "version": "0.21.3", "dev": true, @@ -5765,18 +5453,6 @@ "node": ">= 0.8" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", - "dev": true, - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/username": { "version": "5.1.0", "dev": true, diff --git a/ElectronJS/package.json b/ElectronJS/package.json index 9e8fe9d..93946e6 100644 --- a/ElectronJS/package.json +++ b/ElectronJS/package.json @@ -1,7 +1,7 @@ { "name": "easy-spider", "productName": "EasySpider", - "version": "0.5.0", + "version": "0.6.0", "icon": "./favicon", "description": "NoCode Visual Web Crawler", "main": "main.js", @@ -27,7 +27,7 @@ "@electron-forge/maker-rpm": "^6.0.5", "@electron-forge/maker-squirrel": "^6.0.5", "@electron-forge/maker-zip": "^6.0.5", - "electron": "^20.0.1" + "electron": "^27.1.3" }, "repository": "https://github.com/NaiboWang/EasySpider", "dependencies": { @@ -66,7 +66,7 @@ ], "packagerConfig": { "icon": "./favicon", - "appVersion": "0.5.0", + "appVersion": "0.6.0", "name": "EasySpider", "executableName": "EasySpider", "appCopyright": "Naibo Wang (naibowang@foxmail.com)", diff --git a/ElectronJS/server.js b/ElectronJS/server.js index c009674..175bbd8 100644 --- a/ElectronJS/server.js +++ b/ElectronJS/server.js @@ -323,7 +323,7 @@ exports.start = function(port = 8074) { task = JSON.parse(task); try{ task["links"] = data["urlList_0"]; - if (tasks["links"] == undefined) { + if (task["links"] == undefined) { task["links"] = "about:blank"; } } catch(error) { diff --git a/ElectronJS/src/index.html b/ElectronJS/src/index.html index 7233348..0fa750d 100644 --- a/ElectronJS/src/index.html +++ b/ElectronJS/src/index.html @@ -40,7 +40,7 @@

English

-

当前版本/Current Version: v0.5.0

+

当前版本/Current Version: v0.6.0

Github最新版本/Newest Version:{{newest_version}}

diff --git a/ElectronJS/src/taskGrid/FlowChart.html b/ElectronJS/src/taskGrid/FlowChart.html index a574c74..2e7e848 100644 --- a/ElectronJS/src/taskGrid/FlowChart.html +++ b/ElectronJS/src/taskGrid/FlowChart.html @@ -195,7 +195,7 @@

Clear other field existing values before extracting

-

This operation will generate a new row of data:

+

This operation will generate a new row of data

diff --git a/ElectronJS/src/taskGrid/logic.js b/ElectronJS/src/taskGrid/logic.js index 1577464..192bb8b 100644 --- a/ElectronJS/src/taskGrid/logic.js +++ b/ElectronJS/src/taskGrid/logic.js @@ -339,7 +339,7 @@ if (mobile == "true") { } let serviceInfo = { - "version": "0.5.0" + "version": "0.6.0" }; function saveService(type) { @@ -473,7 +473,7 @@ function saveService(type) { "links": links, "create_time": parseInt(serviceId) == -1 ? new Date().toLocaleString() : $("#create_time").val(), "update_time": new Date().toLocaleString(), - "version": "0.5.0", + "version": "0.6.0", "saveThreshold": saveThreshold, "cloudflare": cloudflare, "environment": environment, diff --git a/ElectronJS/tasks/212.json b/ElectronJS/tasks/212.json new file mode 100644 index 0000000..40f80ce --- /dev/null +++ b/ElectronJS/tasks/212.json @@ -0,0 +1,871 @@ +{ + "id": 212, + "name": "中国地震台网——历史查询", + "url": "https://www.ceic.ac.cn/history", + "links": "https://www.ceic.ac.cn/history", + "create_time": "12/4/2023, 2:50:18 AM", + "update_time": "12/4/2023, 2:50:18 AM", + "version": "0.6.0", + "saveThreshold": 10, + "cloudflare": 0, + "environment": 0, + "maxViewLength": 15, + "recordLog": 1, + "outputFormat": "xlsx", + "saveName": "current_time", + "inputExcel": "", + "startFromExit": 0, + "containJudge": false, + "desc": "https://www.ceic.ac.cn/history", + "inputParameters": [ + { + "id": 0, + "name": "urlList_0", + "nodeId": 1, + "nodeName": "打开网页", + "value": "https://www.ceic.ac.cn/history", + "desc": "要采集的网址列表,多行以\\n分开", + "type": "text", + "exampleValue": "https://www.ceic.ac.cn/history" + }, + { + "id": 1, + "name": "inputText_1", + "nodeName": "输入文字", + "nodeId": 2, + "desc": "要输入的文本,如京东搜索框输入:电脑", + "type": "text", + "exampleValue": "15", + "value": "15" + }, + { + "id": 2, + "name": "loopTimes_循环_2", + "nodeId": 4, + "nodeName": "循环", + "desc": "循环循环执行的次数(0代表无限循环)", + "type": "int", + "exampleValue": 0, + "value": 0 + } + ], + "outputParameters": [ + { + "id": 0, + "name": "参数1_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "4.7" + }, + { + "id": 1, + "name": "参数2_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "2023-11-1100:54:38" + }, + { + "id": 2, + "name": "参数3_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "23.42" + }, + { + "id": 3, + "name": "参数4_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "121.70" + }, + { + "id": 4, + "name": "参数5_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "30" + }, + { + "id": 5, + "name": "参数6_链接文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "台湾台东县海域" + }, + { + "id": 6, + "name": "参数7_链接地址", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "https://news.ceic.ac.cn/CD20231111005438.html" + }, + { + "id": 7, + "name": "参数8_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "震级(M)" + }, + { + "id": 8, + "name": "参数9_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "发震时刻(UTC+8)" + }, + { + "id": 9, + "name": "参数10_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "纬度(°)" + }, + { + "id": 10, + "name": "参数11_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "经度(°)" + }, + { + "id": 11, + "name": "参数12_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "深度(千米)" + }, + { + "id": 12, + "name": "参数13_文本", + "desc": "", + "type": "text", + "recordASField": 1, + "exampleValue": "参考位置" + } + ], + "graph": [ + { + "index": 0, + "id": 0, + "parentId": 0, + "type": -1, + "option": 0, + "title": "root", + "sequence": [ + 1, + 2, + 3, + 4 + ], + "parameters": { + "history": 1, + "tabIndex": 0, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 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, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "url": "https://www.ceic.ac.cn/history", + "links": "https://www.ceic.ac.cn/history", + "maxWaitTime": 10, + "scrollType": 0, + "scrollCount": 1, + "scrollWaitTime": 1, + "cookies": "" + } + }, + { + "id": 2, + "index": 2, + "parentId": 0, + "type": 0, + "option": 4, + "title": "输入文字", + "sequence": [], + "isInLoop": false, + "position": 1, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": false, + "xpath": "//*[@id=\"weidu1\"]", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "value": "15", + "index": 0, + "allXPaths": [ + "/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[2]/input[1]", + "//input[contains(., '')]", + "id(\"weidu1\")", + "//INPUT[@class='span1']", + "//INPUT[@name='weidu1']", + "/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div[last()-3]/input[last()-1]" + ] + } + }, + { + "id": 3, + "index": 3, + "parentId": 0, + "type": 0, + "option": 2, + "title": "点击查询", + "sequence": [], + "isInLoop": false, + "position": 2, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": false, + "xpath": "//*[@id=\"search\"]", + "iframe": false, + "wait": 2, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "scrollType": 0, + "scrollCount": 1, + "scrollWaitTime": 1, + "clickWay": 0, + "maxWaitTime": 10, + "paras": [], + "allXPaths": [ + "/html/body/div[1]/div[3]/div[1]/div[1]/div[1]/form[1]/div[5]/a[1]", + "//a[contains(., '查询')]", + "id(\"search\")", + "//A[@class='check']", + "/html/body/div[last()-3]/div[last()-1]/div/div/div[last()-1]/form/div/a" + ] + } + }, + { + "id": 4, + "index": 4, + "parentId": 0, + "type": 1, + "option": 8, + "title": "循环", + "sequence": [ + 6, + 5 + ], + "isInLoop": false, + "position": 3, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": false, + "xpath": "//*[contains(@class, \"pagination\")]/ul[1]/li[last()-1]/a[1]", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "scrollType": 0, + "scrollCount": 1, + "scrollWaitTime": 1, + "loopType": 0, + "pathList": "", + "textList": "", + "code": "", + "waitTime": 0, + "exitCount": 0, + "historyWait": 2, + "breakMode": 0, + "breakCode": "", + "breakCodeWaitTime": 0, + "allXPaths": [ + "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]", + "//a[contains(., '»')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a" + ] + } + }, + { + "id": 6, + "index": 5, + "parentId": 4, + "type": 0, + "option": 2, + "title": "点击»", + "sequence": [], + "isInLoop": true, + "position": 1, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": true, + "xpath": "", + "iframe": false, + "wait": 2, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "scrollType": 0, + "scrollCount": 1, + "scrollWaitTime": 1, + "clickWay": 0, + "maxWaitTime": 10, + "paras": [], + "allXPaths": [ + "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]/ul[1]/li[10]/a[1]", + "//a[contains(., '»')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div/div/div/ul/li[last()-1]/a" + ], + "loopType": 0 + } + }, + { + "id": 5, + "index": 6, + "parentId": 4, + "type": 1, + "option": 8, + "title": "循环", + "sequence": [ + 7 + ], + "isInLoop": true, + "position": 0, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": false, + "xpath": "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "scrollType": 0, + "scrollCount": 1, + "scrollWaitTime": 1, + "loopType": 1, + "pathList": "", + "textList": "", + "code": "", + "waitTime": 0, + "exitCount": 0, + "historyWait": 2, + "breakMode": 0, + "breakCode": "", + "breakCodeWaitTime": 0, + "allXPaths": [ + "/html/body/div[1]/div[3]/div[1]/div[1]/div[2]/div[1]/div[1]/table[1]/tbody[1]/tr[1]", + "//tr[contains(., '震级(M)发震时刻(')]", + "//TR[@class='speed-tr-h1']", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]" + ] + } + }, + { + "id": 7, + "index": 7, + "parentId": 5, + "type": 0, + "option": 3, + "title": "提取数据", + "sequence": [], + "isInLoop": true, + "position": 0, + "parameters": { + "history": 4, + "tabIndex": -1, + "useLoop": false, + "xpath": "", + "iframe": false, + "wait": 0, + "waitType": 0, + "beforeJS": "", + "beforeJSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "waitElement": "", + "waitElementTime": 10, + "waitElementIframeIndex": 0, + "clear": 0, + "newLine": 1, + "paras": [ + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数1_文本", + "desc": "", + "relativeXPath": "/td[1]", + "allXPaths": [ + "/td[1]", + "//td[contains(., '4.7')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr/td[last()-5]" + ], + "exampleValues": [ + { + "num": 0, + "value": "4.7" + } + ], + "unique_index": "/td[1]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数2_文本", + "desc": "", + "relativeXPath": "/td[2]", + "allXPaths": [ + "/td[2]", + "//td[contains(., '2023-11-11')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr/td[last()-4]" + ], + "exampleValues": [ + { + "num": 0, + "value": "2023-11-1100:54:38" + } + ], + "unique_index": "/td[2]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数3_文本", + "desc": "", + "relativeXPath": "/td[3]", + "allXPaths": [ + "/td[3]", + "//td[contains(., '23.42')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr/td[last()-3]" + ], + "exampleValues": [ + { + "num": 0, + "value": "23.42" + } + ], + "unique_index": "/td[3]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数4_文本", + "desc": "", + "relativeXPath": "/td[4]", + "allXPaths": [ + "/td[4]", + "//td[contains(., '121.70')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr/td[last()-2]" + ], + "exampleValues": [ + { + "num": 0, + "value": "121.70" + } + ], + "unique_index": "/td[4]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数5_文本", + "desc": "", + "relativeXPath": "/td[5]", + "allXPaths": [ + "/td[5]", + "//td[contains(., '30')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr/td[last()-1]" + ], + "exampleValues": [ + { + "num": 0, + "value": "30" + } + ], + "unique_index": "/td[5]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 1, + "contentType": 0, + "relative": true, + "name": "参数6_链接文本", + "desc": "", + "relativeXPath": "/td[6]/a[1]", + "allXPaths": [ + "/td[6]/a[1]", + "//a[contains(., '台湾台东县海域')]", + "id(\"cid\")", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr/td/a" + ], + "exampleValues": [ + { + "num": 0, + "value": "台湾台东县海域" + } + ], + "unique_index": "/td[6]/a[1]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 2, + "contentType": 0, + "relative": true, + "name": "参数7_链接地址", + "desc": "", + "relativeXPath": "/td[6]/a[1]", + "allXPaths": [ + "/td[6]/a[1]", + "//a[contains(., '台湾台东县海域')]", + "id(\"cid\")", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr/td/a" + ], + "exampleValues": [ + { + "num": 0, + "value": "https://news.ceic.ac.cn/CD20231111005438.html" + } + ], + "unique_index": "/td[6]/a[1]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数8_文本", + "desc": "", + "relativeXPath": "/th[1]", + "allXPaths": [ + "/th[1]", + "//th[contains(., '震级(M)')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-5]" + ], + "exampleValues": [ + { + "num": 1, + "value": "震级(M)" + } + ], + "unique_index": "/th[1]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数9_文本", + "desc": "", + "relativeXPath": "/th[2]", + "allXPaths": [ + "/th[2]", + "//th[contains(., '发震时刻(UTC+8')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-4]" + ], + "exampleValues": [ + { + "num": 1, + "value": "发震时刻(UTC+8)" + } + ], + "unique_index": "/th[2]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数10_文本", + "desc": "", + "relativeXPath": "/th[3]", + "allXPaths": [ + "/th[3]", + "//th[contains(., '纬度(°)')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-3]" + ], + "exampleValues": [ + { + "num": 1, + "value": "纬度(°)" + } + ], + "unique_index": "/th[3]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数11_文本", + "desc": "", + "relativeXPath": "/th[4]", + "allXPaths": [ + "/th[4]", + "//th[contains(., '经度(°)')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-2]" + ], + "exampleValues": [ + { + "num": 1, + "value": "经度(°)" + } + ], + "unique_index": "/th[4]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数12_文本", + "desc": "", + "relativeXPath": "/th[5]", + "allXPaths": [ + "/th[5]", + "//th[contains(., '深度(千米)')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th[last()-1]" + ], + "exampleValues": [ + { + "num": 1, + "value": "深度(千米)" + } + ], + "unique_index": "/th[5]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + }, + { + "nodeType": 0, + "contentType": 1, + "relative": true, + "name": "参数13_文本", + "desc": "", + "relativeXPath": "/th[6]", + "allXPaths": [ + "/th[6]", + "//th[contains(., '参考位置')]", + "/html/body/div[last()-3]/div[last()-1]/div/div/div/div/div[last()-1]/table/tbody/tr[last()-20]/th" + ], + "exampleValues": [ + { + "num": 1, + "value": "参考位置" + } + ], + "unique_index": "/th[6]", + "iframe": false, + "default": "", + "paraType": "text", + "recordASField": 1, + "beforeJS": "", + "beforeJSWaitTime": 0, + "JS": "", + "JSWaitTime": 0, + "afterJS": "", + "afterJSWaitTime": 0, + "downloadPic": 0 + } + ], + "loopType": 1 + } + } + ] +} \ No newline at end of file diff --git a/ElectronJS/update_chrome.py b/ElectronJS/update_chrome.py index cac4ec8..8bc85ac 100644 --- a/ElectronJS/update_chrome.py +++ b/ElectronJS/update_chrome.py @@ -96,8 +96,8 @@ if __name__ == "__main__": versions = json.loads(response.content)["versions"] versions = versions[::-1] # 倒序排列数组 for info in versions: - version = info["version"] - if version.find(chrome_version) >= 0: + version = info["version"].split(".")[0] + if version.find(chrome_version) == 0: downloads = info["downloads"] if "chromedriver" in downloads: print(info["version"]) diff --git a/ExecuteStage/.vscode/launch.json b/ExecuteStage/.vscode/launch.json index 42db39f..edf0589 100644 --- a/ExecuteStage/.vscode/launch.json +++ b/ExecuteStage/.vscode/launch.json @@ -12,7 +12,7 @@ "justMyCode": false, // "args": ["--id", "[7]", "--read_type", "remote", "--headless", "0"] // "args": ["--id", "[9]", "--read_type", "remote", "--headless", "0", "--saved_file_name", "YOUTUBE"] - "args": ["--id", "[52]", "--headless", "0", "--user_data", "0", "--keyboard", "0"] + "args": ["--id", "[54]", "--headless", "0", "--user_data", "0", "--keyboard", "0"] } ] } \ No newline at end of file diff --git a/ExecuteStage/easyspider_executestage.py b/ExecuteStage/easyspider_executestage.py index cc9f300..33099d8 100644 --- a/ExecuteStage/easyspider_executestage.py +++ b/ExecuteStage/easyspider_executestage.py @@ -1855,7 +1855,7 @@ if __name__ == '__main__': "headless": False, "server_address": "http://localhost:8074", "keyboard": True, # 是否监听键盘输入 - "version": "0.5.0", + "version": "0.6.0", } c = Config(config) print(c) @@ -1965,6 +1965,10 @@ if __name__ == '__main__': options.add_argument( f'--user-data-dir={absolute_user_data_folder}') # TMALL 反扒 options.add_argument("--profile-directory=Default") + print("正在使用带用户信息浏览器模式,注意此模式同一个用户信息目录只能同时运行一个浏览器实例,如果需要多开请复制用户信息目录并载入复制的目录地址,具体请参考程序多开文档:https://github.com/NaiboWang/EasySpider/wiki/Run-multiple-tasks-in-parallel") + print("Using browser with user data, please note that only one browser instance can be run at the same time with the same user data directory, if you need to run multiple instances, please copy the user data directory and load the copied directory address, please refer to the program multiple open document for details: https://github.com/NaiboWang/EasySpider/wiki/Run-multiple-tasks-in-parallel") + print("如果报错Selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally,说明有之前运行的Chrome实例没有正常关闭,请关闭之前打开的所有Chrome实例后再运行程序即可。") + print("If you get an error Selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally, it means that there is a Chrome instance that was not closed properly before, please close all Chrome instances that were opened before running the program.") if c.headless: print("Headless mode") diff --git a/ExecuteStage/utils.py b/ExecuteStage/utils.py index 77f9dc9..798c2f0 100644 --- a/ExecuteStage/utils.py +++ b/ExecuteStage/utils.py @@ -188,9 +188,9 @@ def replace_field_values(orginal_text, outputParameters, browser=None): try: replaced_text = re.sub( pattern, lambda match: outputParameters.get(match.group(1), ''), orginal_text) - if replaced_text.find("EVAL") != -1: # 如果返回值中包含EVAL + if re.search(r'eval(', replaced_text, re.IGNORECASE): # 如果返回值中包含EVAL replaced_text = replaced_text.replace("self.", "browser.") - replaced_text = re.sub(r'EVAL\("(.*?)"\)', lambda match: str(eval(match.group(1))), replaced_text) + replaced_text = re.sub(r'eval\("(.*?)"\)', lambda match: str(eval(match.group(1))), replaced_text, flags=re.IGNORECASE) except: replaced_text = orginal_text return replaced_text diff --git a/Extension/manifest_v3/package.json b/Extension/manifest_v3/package.json index 99182e3..1dc776e 100644 --- a/Extension/manifest_v3/package.json +++ b/Extension/manifest_v3/package.json @@ -1,6 +1,6 @@ { "name": "EasySpider", - "version": "0.5.0", + "version": "0.6.0", "type": "module", "scripts": { "build": "rollup -c", diff --git a/Extension/manifest_v3/src/manifest.json b/Extension/manifest_v3/src/manifest.json index ebfdf56..5309ea4 100644 --- a/Extension/manifest_v3/src/manifest.json +++ b/Extension/manifest_v3/src/manifest.json @@ -1,6 +1,6 @@ { "name": "EasySpider", - "version": "0.5.0", + "version": "0.6.0", "description": "EasySpider's chrome extension", "author": "Naibo Wang", "manifest_version": 3,