mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2025-04-20 12:30:02 +08:00
Add make options
This commit is contained in:
parent
28617d92d9
commit
9cd3e2c988
@ -283,6 +283,7 @@ async function runBrowser(lang = "en", user_data_folder = '') {
|
|||||||
options.setChromeBinaryPath(chromeBinaryPath);
|
options.setChromeBinaryPath(chromeBinaryPath);
|
||||||
if (user_data_folder != "") {
|
if (user_data_folder != "") {
|
||||||
let dir = __dirname.indexOf("resources") >= 0 && __dirname.indexOf("app") >= 0 ? path.join(__dirname, "../../..", user_data_folder) : path.join(__dirname, user_data_folder);
|
let dir = __dirname.indexOf("resources") >= 0 && __dirname.indexOf("app") >= 0 ? path.join(__dirname, "../../..", user_data_folder) : path.join(__dirname, user_data_folder);
|
||||||
|
console.log(dir);
|
||||||
options.addArguments("--user-data-dir=" + dir);
|
options.addArguments("--user-data-dir=" + dir);
|
||||||
config.user_data_folder = user_data_folder;
|
config.user_data_folder = user_data_folder;
|
||||||
fs.writeFileSync(path.join(task_server.getDir(), "config.json"), JSON.stringify(config));
|
fs.writeFileSync(path.join(task_server.getDir(), "config.json"), JSON.stringify(config));
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
"@electron-forge/maker-zip": "^6.0.5",
|
"@electron-forge/maker-zip": "^6.0.5",
|
||||||
"electron": "^20.0.1"
|
"electron": "^20.0.1"
|
||||||
},
|
},
|
||||||
"repository": "https://github.com/electron/electron-quick-start",
|
"repository": "https://github.com/NaiboWang/EasySpider",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-squirrel-startup": "^1.0.0",
|
"electron-squirrel-startup": "^1.0.0",
|
||||||
"http": "^0.0.1-security",
|
"http": "^0.0.1-security",
|
||||||
@ -38,11 +38,31 @@
|
|||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"forge": {
|
"forge": {
|
||||||
"makers": [],
|
"makers": [
|
||||||
|
{
|
||||||
|
"name": "@electron-forge/maker-squirrel",
|
||||||
|
"config": {
|
||||||
|
"name": "EasySpider"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "@electron-forge/maker-zip",
|
||||||
|
"platforms": [
|
||||||
|
"darwin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "@electron-forge/maker-deb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "@electron-forge/maker-rpm"
|
||||||
|
}
|
||||||
|
],
|
||||||
"packagerConfig": {
|
"packagerConfig": {
|
||||||
"icon": "favicon.ico",
|
"icon": "favicon.ico",
|
||||||
"appVersion": "0.1.0",
|
"appVersion": "0.1.0",
|
||||||
"name": "EasySpider",
|
"name": "EasySpider",
|
||||||
|
"executableName":"easy-spider",
|
||||||
"appCopyright": "Naibo Wang (naibowang@foxmail.com)",
|
"appCopyright": "Naibo Wang (naibowang@foxmail.com)",
|
||||||
"win32metadata": {
|
"win32metadata": {
|
||||||
"ProductName": "EasySpider",
|
"ProductName": "EasySpider",
|
||||||
|
1
ElectronJS/tasks/33.json
Normal file
1
ElectronJS/tasks/33.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"id":33,"name":"新web采集任务","url":"https://www.jd.com","links":"https://www.jd.com","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":[],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1],"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,"url":"https://www.jd.com","links":"https://www.jd.com","scrollType":0,"scrollCount":0}}]}
|
@ -1 +1 @@
|
|||||||
{"webserver_address":"http://localhost","webserver_port":8074,"user_data_folder":"./user_data","absolute_user_data_folder":"D:\\Documents\\Projects\\EasySpider\\Releases\\EasySpider_windows_amd64\\user_data"}
|
{"webserver_address":"http://localhost","webserver_port":8074,"user_data_folder":"./user_data","absolute_user_data_folder":"/home/naibo/Documents/EasySpider/Releases/EasySpider_linux_amd64_Ubuntu/user_data"}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
Releases/EasySpider_linux_amd64_Ubuntu/tasks/34.json
Normal file
1
Releases/EasySpider_linux_amd64_Ubuntu/tasks/34.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"id":34,"name":"新web采集任务","url":"https://www.jd.com","links":"https://www.jd.com","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":[],"graph":[{"index":0,"id":0,"parentId":0,"type":-1,"option":0,"title":"root","sequence":[1],"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,"url":"https://www.jd.com","links":"https://www.jd.com","scrollType":0,"scrollCount":0}}]}
|
6
package-lock.json
generated
Normal file
6
package-lock.json
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "EasySpider",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user