mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2026-09-21 05:20:38 +08:00
Version 0.3.1
This commit is contained in:
+8
-1
@@ -223,6 +223,12 @@ async function beginInvoke(msg, ws) {
|
||||
} else {
|
||||
ws.send(JSON.stringify({"config_folder": task_server.getDir() + "/", "easyspider_location": task_server.getEasySpiderLocation()}));
|
||||
}
|
||||
} else if (msg.type == 6) {
|
||||
try{
|
||||
flowchart_window.openDevTools();
|
||||
} catch {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +260,8 @@ wss.on('connection', function (ws) {
|
||||
console.log("New tab opened, change current_handle to: ", current_handle);
|
||||
}
|
||||
handle_pairs[msg.message.id] = current_handle;
|
||||
console.log("Set handle_pair for id: ", msg.message.id, " to ", current_handle);
|
||||
console.log("Set handle_pair for id: ", msg.message.id, " to ", current_handle, ", title is: ", msg.message.title);
|
||||
socket_flowchart.send(JSON.stringify({"type": "title", "data": {"title":msg.message.title}}));
|
||||
// console.log("handle_pairs: ", handle_pairs);
|
||||
}
|
||||
} else if (msg.type == 10) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "easy-spider",
|
||||
"productName": "EasySpider",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"icon": "./favicon",
|
||||
"description": "NoCode Visual Web Crawler",
|
||||
"main": "main.js",
|
||||
@@ -60,7 +60,7 @@
|
||||
],
|
||||
"packagerConfig": {
|
||||
"icon": "./favicon",
|
||||
"appVersion": "0.3.0",
|
||||
"appVersion": "0.3.1",
|
||||
"name": "EasySpider",
|
||||
"executableName": "EasySpider",
|
||||
"appCopyright": "Naibo Wang (naibowang@foxmail.com)",
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<p style="font-size: 22px!important;text-align: center;margin-left: 1px;">■</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top:20px;border: solid navy;height:850px;overflow: auto;margin-left:10px;width:30%;float:right;min-width:300px">
|
||||
<div style="margin-top:20px;border: solid navy;height:850px;overflow: auto;margin-left:10px;margin-right:10px;width:30%;float:right;min-width:300px">
|
||||
<!-- <div style="display: inline-block;border-bottom:solid 2px;width:100%">
|
||||
<input style="float:left;margin-left:10px;margin-top:10px;margin-bottom:10px" type="button" class="btn-primary" value="保存任务"></input>
|
||||
</div> -->
|
||||
@@ -111,8 +111,10 @@
|
||||
<option value = 1>向下滚动一屏</option>
|
||||
<option value = 2>滚动到底部</option>
|
||||
</select>
|
||||
<label>滚动次数:</label>
|
||||
<label>滚动次数(滚动类型设置为<b>不滚动</b>时<b>无效</b>):</label>
|
||||
<input onkeydown="inputDelete(event)" class="form-control" v-model.number="nowNode['parameters']['scrollCount']" type="number" required></input>
|
||||
<label>滚动后等待时间(秒):</label>
|
||||
<input onkeydown="inputDelete(event)" class="form-control" v-model.number="nowNode['parameters']['scrollWaitTime']" type="number" required></input>
|
||||
</div>
|
||||
|
||||
<div class="elements" v-if="nodeType==2">
|
||||
@@ -133,8 +135,10 @@
|
||||
<option value = 1>向下滚动一屏</option>
|
||||
<option value = 2>滚动到底部</option>
|
||||
</select>
|
||||
<label>滚动次数:</label>
|
||||
<label>滚动次数(滚动类型设置为<b>不滚动</b>时<b>无效</b>):</label>
|
||||
<input onkeydown="inputDelete(event)" class="form-control" v-model.number="nowNode['parameters']['scrollCount']" type="number" required></input>
|
||||
<label>滚动后等待时间(秒):</label>
|
||||
<input onkeydown="inputDelete(event)" class="form-control" v-model.number="nowNode['parameters']['scrollWaitTime']" type="number" required></input>
|
||||
<p style="margin-top: 10px">
|
||||
<a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
|
||||
点此展开/折叠高级操作
|
||||
@@ -219,6 +223,8 @@
|
||||
<option :value = 7>元素截图</option>
|
||||
<option :value = 8>OCR识别文字</option>
|
||||
<option :value = 9>针对该元素的JavaScript代码返回值</option>
|
||||
<option :value = 10>当前选择框选中的选项值</option>
|
||||
<option :value = 11>当前选择框选中的选项文本</option>
|
||||
</select>
|
||||
<div v-if='paras.parameters[paraIndex]["contentType"] == 9'>
|
||||
<label>JavaScript代码: </label>
|
||||
@@ -316,11 +322,26 @@
|
||||
</div>
|
||||
|
||||
<div class="elements" v-if="nodeType==6">
|
||||
<label>XPath: </label>
|
||||
<textarea onkeydown="inputDelete(event)" class="form-control" rows="2" v-model='nowNode["parameters"]["xpath"]'></textarea>
|
||||
<p><button type="button" data-toggle="modal" data-target="#myModal_XPath" @click="changeXPaths(nowNode['parameters']['allXPaths'])" class="btn btn-primary" style="margin-top: 10px">点此查看其他等价的XPath</button></p>
|
||||
|
||||
<p>切换模式</p>
|
||||
|
||||
<select class="form-control" v-model='nowNode["parameters"]["optionMode"]'>
|
||||
<option value=0>切换到下一个选项</option>
|
||||
<option value=1>按索引值切换选项</option>
|
||||
<option value=2>按选项值切换选项</option>
|
||||
<option value=3>按选项文本切换选项</option>
|
||||
</select>
|
||||
<p>设定值(不适用于切换到下一个选项模式)</p>
|
||||
<input class="form-control" id="selectValue" v-model='nowNode["parameters"]["optionValue"]' autoFocus="autofocus" type="text"></input>
|
||||
</div>
|
||||
|
||||
<div class="elements" v-if="nodeType==7">
|
||||
|
||||
<label>XPath: </label>
|
||||
<textarea onkeydown="inputDelete(event)" class="form-control" rows="2" v-model='nowNode["parameters"]["xpath"]'></textarea>
|
||||
<p><button type="button" data-toggle="modal" data-target="#myModal_XPath" @click="changeXPaths(nowNode['parameters']['allXPaths'])" class="btn btn-primary" style="margin-top: 10px">点此查看其他等价的XPath</button></p>
|
||||
</div>
|
||||
|
||||
<div class="elements" v-if="nodeType==8">
|
||||
@@ -359,16 +380,18 @@
|
||||
<input onkeydown="inputDelete(event)" required v-if='parseInt(loopType) == 0' class="form-control" type="number" v-model.number='nowNode["parameters"]["exitCount"]'></input>
|
||||
|
||||
|
||||
<label><b>历史记录回退后</b>等待秒数:</label>
|
||||
<label><b>历史记录回退后</b>等待秒数:</label>
|
||||
<input onkeydown="inputDelete(event)" required type="number" class="form-control" v-model.number='list.nl[index.nowNodeIndex]["parameters"]["historyWait"]'></input>
|
||||
<label>执行完是否向下滚动:</label>
|
||||
<label>执行完是否向下滚动:</label>
|
||||
<select v-model='nowNode["parameters"]["scrollType"]' class="form-control">
|
||||
<option value = 0>不滚动</option>
|
||||
<option value = 1>向下滚动一屏</option>
|
||||
<option value = 2>滚动到底部</option>
|
||||
</select>
|
||||
<label>滚动次数:</label>
|
||||
<label>滚动次数(滚动类型设置为<b>不滚动</b>时<b>无效</b>):</label>
|
||||
<input onkeydown="inputDelete(event)" class="form-control" v-model.number="nowNode['parameters']['scrollCount']" type="number" required></input>
|
||||
<label>滚动后等待时间(秒):</label>
|
||||
<input onkeydown="inputDelete(event)" class="form-control" v-model.number="nowNode['parameters']['scrollWaitTime']" type="number" required></input>
|
||||
<div id="breakAdvanced" v-if='nowNode["parameters"]["loopType"] < 5'>
|
||||
<div>
|
||||
<p><label>(高级操作)使用代码/脚本定义循环退出条件: </label></p>
|
||||
@@ -421,7 +444,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top:5px">
|
||||
<label><b>执行后</b>等待秒数:</label>
|
||||
<label><b>执行后</b>等待秒数:</label>
|
||||
<input onkeydown="inputDelete(event)" required type="number" class="form-control" v-model.number='list.nl[index.nowNodeIndex]["parameters"]["wait"]'></input>
|
||||
</div>
|
||||
<button class="btn btn-outline-primary" style="margin-top: 20px;" id="confirm">确定</button>
|
||||
|
||||
@@ -548,17 +548,27 @@ document.oncontextmenu = function() {
|
||||
//删除元素
|
||||
document.onkeydown = function(e) {
|
||||
if (nowNode != null && e.keyCode == 46) {
|
||||
if (confirm("确定要删除元素吗?")) {
|
||||
// if (confirm("确定要删除元素吗?")) {
|
||||
deleteElement();
|
||||
}
|
||||
// }
|
||||
} else { //ctrl+s保存服务
|
||||
let currKey = 0;
|
||||
currKey = e.keyCode || e.which || e.charCode;
|
||||
if (currKey == 83 && (e.ctrlKey || e.metaKey)) {
|
||||
$('#save').click();
|
||||
return true;
|
||||
} else if (currKey == 116) {
|
||||
location.reload();
|
||||
} else if (currKey == 123) {
|
||||
console.log("打开devtools")
|
||||
let command = new WebSocket("ws://localhost:8084")
|
||||
command.onopen = function() {
|
||||
let message = {
|
||||
type: 6, //消息类型,0代表连接操作
|
||||
};
|
||||
this.send(JSON.stringify(message));
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,10 +35,18 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="position: absolute; margin-top: -10px">
|
||||
<div id="tip" class="alert alert-danger alert-dismissible fade show" style="position: fixed; width:100%;display: none; z-index: 1000">
|
||||
提示:请先获得任务ID!</div>
|
||||
<div id="tipEN" class="alert alert-danger alert-dismissible fade show" style="position: fixed; width:100%;display: none; z-index: 1000">
|
||||
Hint: Please get EID first!</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top: 40px;">
|
||||
|
||||
<div class="col-md-6" id="taskInfo" style="margin:0 auto" v-if="show">
|
||||
<div class="col-md-7" id="taskInfo" style="margin:0 auto" v-if="show">
|
||||
|
||||
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
@@ -75,7 +83,7 @@
|
||||
<h4 style="text-align: center;">{{"Task Invocation~任务调用" | lang}}</h4>
|
||||
<p>{{"Task Name:~任务名称:" | lang}} {{task["name"]}}</p>
|
||||
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"Task Description:~任务描述:" | lang}} {{task["desc"]}}</p>
|
||||
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"URL:~URL:" |
|
||||
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"API URL (POST):~API 调用网址(POST):" |
|
||||
lang}} {{backEndAddressServiceWrapper}}/invokeTask?id={{task["id"]}}</p>
|
||||
<p>{{"Please Input Parameters:~请输入参数值:" | lang}} </p>
|
||||
<form id="form">
|
||||
@@ -182,31 +190,37 @@
|
||||
window.location.href = url;
|
||||
}, invokeTask: function () {
|
||||
let text = "";
|
||||
if (getUrlParam("lang") == "en" || getUrlParam("lang") == "") {
|
||||
text = "Are you sure to get the Execution ID (EID) of current running task?";
|
||||
} else {
|
||||
text = "确定要获得当前运行任务的执行ID吗?";
|
||||
}
|
||||
if (confirm(text)) {
|
||||
var para = {};
|
||||
var t = $('#form').serializeArray();
|
||||
t.forEach(function (item, index) {
|
||||
para[item.name] = item.value;
|
||||
});
|
||||
$.post(app.$data.backEndAddressServiceWrapper + "/invokeTask?id=" + sId, {
|
||||
id: this.task.id,
|
||||
paras: JSON.stringify(para)
|
||||
}, function (result) {
|
||||
app.$data.ID = result; //得到返回的ID
|
||||
});
|
||||
}
|
||||
// if (getUrlParam("lang") == "en" || getUrlParam("lang") == "") {
|
||||
// text = "Are you sure to get the Execution ID (EID) of current running task?";
|
||||
// } else {
|
||||
// text = "确定要获得当前运行任务的执行ID吗?";
|
||||
// }
|
||||
// if (confirm(text)) {
|
||||
let para = {};
|
||||
let t = $('#form').serializeArray();
|
||||
t.forEach(function (item, index) {
|
||||
para[item.name] = item.value;
|
||||
});
|
||||
$.post(app.$data.backEndAddressServiceWrapper + "/invokeTask?id=" + sId, {
|
||||
id: this.task.id,
|
||||
paras: JSON.stringify(para)
|
||||
}, function (result) {
|
||||
app.$data.ID = result; //得到返回的ID
|
||||
});
|
||||
// }
|
||||
},
|
||||
localExecute: function (with_user_data=false) {
|
||||
if (this.ID === "") {
|
||||
if (getUrlParam("lang") == "en" || getUrlParam("lang") == "") {
|
||||
alert("Please get EID first!");
|
||||
$("#tipEN").slideDown(); //提示框
|
||||
setTimeout(function() {
|
||||
$("#tipEN").slideUp();
|
||||
}, 3000);
|
||||
} else {
|
||||
alert("请先获得执行ID!");
|
||||
$("#tip").slideDown(); //提示框
|
||||
setTimeout(function() {
|
||||
$("#tip").slideUp();
|
||||
}, 3000);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,12 +24,15 @@ ws.onclose = function() {
|
||||
// 关闭 websocket
|
||||
console.log("连接已关闭...");
|
||||
};
|
||||
var ttt;
|
||||
let old_title = "";
|
||||
ws.onmessage = function(evt) {
|
||||
evt = JSON.parse(evt.data);
|
||||
console.log(evt);
|
||||
if (evt["type"] == "special") { //如果不是特殊处理的话,默认全部是增加元素操作
|
||||
|
||||
if (evt["type"] == "title") { //如果不是特殊处理的话,默认全部是增加元素操作
|
||||
if (old_title == "New Task") { //只记录第一次的title
|
||||
$("#serviceName").val(evt.data.title);
|
||||
}
|
||||
old_title = evt.data.title;
|
||||
} else {
|
||||
handleAddElement(evt); //处理增加元素操作
|
||||
}
|
||||
@@ -60,10 +63,14 @@ function extractTitle(html) {
|
||||
function handleAddElement(msg) {
|
||||
if (msg["type"] == "openPage") {
|
||||
addElement(1, msg);
|
||||
} else if (msg["type"] == "InputText") {
|
||||
addElement(4, msg);
|
||||
} else if (msg["type"] == "singleClick") {
|
||||
addElement(2, msg);
|
||||
} else if (msg["type"] == "InputText") {
|
||||
addElement(4, msg);
|
||||
} else if (msg["type"] == "changeOption"){
|
||||
addElement(6, msg);
|
||||
} else if (msg["type"] == "mouseMove") {
|
||||
addElement(7, msg);
|
||||
} else if (msg["type"] == "loopClickSingle") {
|
||||
addElement(8, msg);
|
||||
addElement(2, msg);
|
||||
@@ -142,10 +149,12 @@ function addParameters(t) {
|
||||
t["parameters"]["links"] = "about:blank";
|
||||
t["parameters"]["maxWaitTime"] = 10; //最长等待时间
|
||||
t["parameters"]["scrollType"] = 0; //滚动类型,0不滚动,1向下滚动1屏,2滚动到底部
|
||||
t["parameters"]["scrollCount"] = 0; //滚动次数
|
||||
t["parameters"]["scrollCount"] = 1; //滚动次数
|
||||
t["parameters"]["scrollWaitTime"] = 1; //滚动后等待时间
|
||||
} else if (t.option == 2) { //点击元素
|
||||
t["parameters"]["scrollType"] = 0; //滚动类型,0不滚动,1向下滚动1屏,2滚动到底部
|
||||
t["parameters"]["scrollCount"] = 0; //滚动次数
|
||||
t["parameters"]["scrollCount"] = 1; //滚动次数
|
||||
t["parameters"]["scrollWaitTime"] = 1; //滚动后等待时间
|
||||
t["parameters"]["maxWaitTime"] = 10; //最长等待时间
|
||||
t["parameters"]["paras"] = []; //默认参数列表
|
||||
t["parameters"]["beforeJS"] = ""; //执行前执行的js
|
||||
@@ -167,7 +176,8 @@ function addParameters(t) {
|
||||
t["parameters"]["recordASField"] = 0; //是否记录脚本输出
|
||||
} else if (t.option == 8) { //循环
|
||||
t["parameters"]["scrollType"] = 0; //滚动类型,0不滚动,1向下滚动1屏,2滚动到底部
|
||||
t["parameters"]["scrollCount"] = 0; //滚动次数
|
||||
t["parameters"]["scrollCount"] = 1; //滚动次数
|
||||
t["parameters"]["scrollWaitTime"] = 1; //滚动后等待时间
|
||||
t["parameters"]["loopType"] = 0; //默认循环类型
|
||||
t["parameters"]["xpath"] = "";
|
||||
t["parameters"]["pathList"] = "";
|
||||
@@ -189,7 +199,7 @@ function addParameters(t) {
|
||||
}
|
||||
}
|
||||
|
||||
//修改元素参数
|
||||
//修改元素参数,注意所有socket传过来的参数都需要在这里赋值给操作
|
||||
function modifyParameters(t, para) {
|
||||
t["parameters"]["history"] = para["history"];
|
||||
t["parameters"]["tabIndex"] = para["tabIndex"];
|
||||
@@ -198,13 +208,21 @@ function modifyParameters(t, para) {
|
||||
t["parameters"]["links"] = para["links"];
|
||||
$("#serviceDescription").val(para["url"]);
|
||||
$("#url").val(para["url"]);
|
||||
} else if (t.option == 2) { //鼠标点击事件
|
||||
t["parameters"]["xpath"] = para["xpath"];
|
||||
t["parameters"]["useLoop"] = para["useLoop"];
|
||||
t["parameters"]["allXPaths"] = para["allXPaths"];
|
||||
} else if (t.option == 4) { //输入文字事件
|
||||
t["parameters"]["value"] = para["value"];
|
||||
t["parameters"]["xpath"] = para["xpath"];
|
||||
t["parameters"]["allXPaths"] = para["allXPaths"];
|
||||
} else if (t.option == 2) { //鼠标点击事件
|
||||
} else if(t.option == 6){
|
||||
t["parameters"]["xpath"] = para["xpath"];
|
||||
t["parameters"]["allXPaths"] = para["allXPaths"];
|
||||
t["parameters"]["optionMode"] = para["optionMode"];
|
||||
t["parameters"]["optionValue"] = para["optionValue"];
|
||||
} else if(t.option == 7){
|
||||
t["parameters"]["xpath"] = para["xpath"];
|
||||
t["parameters"]["useLoop"] = para["useLoop"];
|
||||
t["parameters"]["allXPaths"] = para["allXPaths"];
|
||||
} else if (t.option == 8) { //循环事件
|
||||
t["parameters"]["loopType"] = para["loopType"];
|
||||
@@ -378,7 +396,7 @@ function saveService(type) {
|
||||
"url": url,
|
||||
"links": links,
|
||||
"create_time": new Date().toLocaleString(),
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"containJudge": containJudge,
|
||||
"desc": serviceDescription,
|
||||
"inputParameters": inputParameters,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</nav>
|
||||
<h4 style="text-align: center;">{{"New Task~新任务" | lang}}</h4>
|
||||
<div class="form-group">
|
||||
<label>{{"Please Input URL (http or https):~请输入网页URL(以http或https开头):" | lang}} </label>
|
||||
<label>{{"Please Input URL (http or https):~请输入网页网址(以http或https开头):" | lang}} </label>
|
||||
<textarea class="form-control" id="links" placeholder="links" style="min-height: 100px;">{{"https://www.ebay.com~https://www.jd.com" | lang}}</textarea>
|
||||
</div>
|
||||
<button type="submit" id="send" class="btn btn-primary">{{"Start Design~开始设计" | lang}}</button>
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
<body>
|
||||
|
||||
<div class="row" style="margin-top: 40px;">
|
||||
<div class="col-md-6" style="margin:0 auto" id="taskInfo" v-if="show">
|
||||
|
||||
<div class="col-md-7" style="margin:0 auto" id="taskInfo" v-if="show">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb" style="padding-left:0;background-color: white">
|
||||
<li class="breadcrumb-item" @click="gotoHome"><a href="#">{{"Home~首页" | lang}}</a></li>
|
||||
@@ -45,7 +46,7 @@
|
||||
<h4 style="text-align: center;">{{"Task Information~任务信息" | lang}}</h4>
|
||||
<p>{{"Task Name:~任务名称:" | lang}} {{task["name"]}}</p>
|
||||
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"Task Description:~任务描述:" | lang}} {{task["desc"]}}</p>
|
||||
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"Example URL:~样例URL:" | lang}} {{task["url"]}}</p>
|
||||
<p style="word-wrap: break-word;word-break: break-all;overflow: hidden;max-height: 100px;">{{"Example URL:~样例网址:" | lang}} {{task["url"]}}</p>
|
||||
<p><a style="margin-top: 5px;" href="javascript:void(0)" v-on:click="modifyTask(task['id'],task['url'])" class="btn btn-primary">{{"Modify Task Workflow~修改任务流程" | lang}}</a>
|
||||
<a style="margin-top: 5px;" href="javascript:void(0)" v-on:click="invokeTask(task['id'],task['url'])" class="btn btn-primary">{{"Invoke Task~调用任务" | lang}}</a></p>
|
||||
<p>{{"Input Parameters:~输入参数:" | lang}}</p>
|
||||
|
||||
@@ -11,30 +11,35 @@
|
||||
<title>Start</title>
|
||||
|
||||
</head>
|
||||
|
||||
<style>
|
||||
th,td{
|
||||
text-align: left;
|
||||
vertical-align: middle!important;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="row" style="margin-top: 40px;">
|
||||
<div style="margin:0 auto;width: 60%;min-width: 500px;" id="taskList">
|
||||
<div style="margin:0 auto;min-width: 70%;" id="taskList">
|
||||
<h4 style="text-align: center;">{{"Task List~任务列表" | lang}}</h4>
|
||||
<p><a v-if="type==3" href="javascript:void(0)" v-on:click="newTask" class="btn btn-primary">{{"New Task~创建新任务" | lang}}</a></p>
|
||||
<div style="max-height: 700px;overflow: auto;margin-bottom: 10px">
|
||||
<table style="table-layout: fixed;" class="table table-hover">
|
||||
<div style="margin-bottom: 10px">
|
||||
<table style="table-layout: auto;" class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No.</th>
|
||||
<th>{{"Task Name~任务名称" | lang}}</th>
|
||||
<th>URL</th>
|
||||
<th v-bind:colspan="type">{{"Operations~操作" | lang}}</th>
|
||||
<th style="text-align: left">No.</th>
|
||||
<th style="text-align: center">{{"Task Name~任务名称" | lang}}</th>
|
||||
<th>网址</th>
|
||||
<th v-bind:colspan="type" style="min-width: 300px">{{"Operations~操作" | lang}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="i in list.length">
|
||||
<td>{{i}}</td>
|
||||
<td style="overflow: hidden;">{{list[i-1]["name"]}}</td>
|
||||
<td style="height: 30px;white-space: nowrap;overflow: hidden;">{{list[i-1]["url"]}}</td>
|
||||
<td><a href="javascript:void(0)" v-on:click="browseTask(list[i-1]['id'])">{{"Task Information~任务信息" | lang}}</a></td>
|
||||
<td v-if="type==3"><a href="javascript:void(0)" v-on:click="modifyTask(list[i-1]['id'],list[i-1]['url'])">{{"Modify Task~修改任务" | lang}}</a></td>
|
||||
<td><a disabled href="javascript:void(0)" v-on:click="deleteTask(list[i-1]['id'])">{{"Delete Task~删除任务" | lang}}</a></td>
|
||||
<td style="text-align: left">{{i}}</td>
|
||||
<td style="overflow: hidden;; max-width: 200px;text-align: center">{{list[i-1]["name"]}}</td>
|
||||
<td style="height: 30px;overflow: hidden; max-width: 200px">{{list[i-1]["url"]}}</td>
|
||||
<td style="text-align: left"><a href="javascript:void(0)" v-on:click="browseTask(list[i-1]['id'])">{{"Task Information~任务信息" | lang}}</a></td>
|
||||
<td style="text-align: left" v-if="type==3"><a href="javascript:void(0)" v-on:click="modifyTask(list[i-1]['id'],list[i-1]['url'])">{{"Modify Task~修改任务" | lang}}</a></td>
|
||||
<td style="text-align: left"><a disabled href="javascript:void(0)" v-on:click="deleteTask(list[i-1]['id'])">{{"Delete Task~删除任务" | lang}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"id":66,"name":"滚动测试","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"5/23/2023, 7:18:55 PM","version":"0.3.0","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":"参数1_文本","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","maxWaitTime":10,"scrollType":"0","scrollCount":1,"scrollWaitTime":1}},{"id":2,"index":2,"parentId":0,"type":1,"option":8,"title":"循环","sequence":[3,4],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":0,"useLoop":false,"xpath":"/html/body/div[58]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":"2","scrollCount":2,"scrollWaitTime":6,"loopType":1,"pathList":"","textList":"","code":"","waitTime":0,"exitCount":0,"historyWait":2,"breakMode":0,"breakCode":"","breakCodeWaitTime":0,"allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]","//div[contains(., '/手机/数码')]","//DIV[@class='LeftSide_menu_item__SBMWC LeftSide_text_space__2UhbG ']"]}},{"id":3,"index":3,"parentId":2,"type":0,"option":3,"title":"提取数据","sequence":[],"isInLoop":true,"position":0,"parameters":{"history":4,"tabIndex":0,"useLoop":false,"xpath":"","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"paras":[{"nodeType":0,"contentType":0,"relative":true,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"","allXPaths":"","exampleValues":[{"num":0,"value":"/手机/数码"},{"num":1,"value":"/家用电器"},{"num":2,"value":"/电脑/办公"},{"num":3,"value":"/家纺/家居/厨具"},{"num":4,"value":"/家具/家装/灯具/工业品"},{"num":5,"value":"/内衣/男装/女装/童装"},{"num":6,"value":"/箱包/钟表/珠宝/女鞋"},{"num":7,"value":"/运动/户外/男鞋"},{"num":8,"value":"/汽车用品/车载电器"},{"num":9,"value":"/母婴/洗护喂养"},{"num":10,"value":"/玩具乐器/宠物生活"},{"num":11,"value":"/家庭清洁/个人护理/计生情趣"},{"num":12,"value":"/图书/童书/文学"}],"default":"","beforeJS":"","beforeJSWaitTime":0,"JS":"","JSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"downloadPic":0}],"loopType":1}},{"id":4,"index":4,"parentId":2,"type":0,"option":2,"title":"点击元素","sequence":[],"isInLoop":true,"position":1,"parameters":{"history":4,"tabIndex":0,"useLoop":false,"xpath":"//*[@id=\"settleup-2014\"]/div[1]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"scrollType":"1","scrollCount":2,"scrollWaitTime":6,"maxWaitTime":10,"paras":[],"allXPaths":["/html/body/div[4]/div[1]/div[3]/div[1]","//div[contains(., '')]","//DIV[@class='cw-icon']"]}}]}
|
||||
@@ -0,0 +1 @@
|
||||
{"id":67,"name":"","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"5/23/2023, 11:47:56 PM","version":"0.3.0","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,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"url":"https://www.jd.com","links":"https://www.jd.com","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1}}]}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"id":69,"name":"京东全球版-专业的综合网上购物商城","url":"https://www.jd.com","links":"https://www.jd.com","create_time":"5/24/2023, 4:07:25 AM","version":"0.3.1","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,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","maxWaitTime":10,"scrollType":0,"scrollCount":1,"scrollWaitTime":1}},{"id":2,"index":2,"parentId":0,"type":0,"option":7,"title":"移动到元素","sequence":[],"isInLoop":false,"position":1,"parameters":{"history":4,"tabIndex":0,"useLoop":false,"xpath":"//*[contains(@class, \"LeftSide_menu_list__qXCeM\")]/div[1]","wait":0,"beforeJS":"","beforeJSWaitTime":0,"afterJS":"","afterJSWaitTime":0,"allXPaths":["/html/body/div[5]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]","//div[contains(., '/手机/数码')]","//DIV[@class='LeftSide_menu_item__SBMWC LeftSide_text_space__2UhbG ']"]}}]}
|
||||
Reference in New Issue
Block a user