version 0.3.0 Beta

This commit is contained in:
naibo 2023-05-18 19:23:22 +08:00
parent a76c1cd097
commit c6dafafd63
3 changed files with 22 additions and 12 deletions

View File

@ -89,13 +89,14 @@ var app = new Vue({
methods: { methods: {
changeXPaths: function (XPaths){ changeXPaths: function (XPaths){
let result = ""; let result = "";
for (var i = 0; i < XPaths.length; i++) { for (let i = 0; i < XPaths.length; i++) {
result += XPaths[i] + "\n"; result += XPaths[i] + "\n";
} }
this.XPaths = result; this.XPaths = result;
}, },
modifyParas: function(i) { //修改第i个参数 modifyParas: function(i) { //修改第i个参数
this.paraIndex = i; this.paraIndex = i;
console.log(this.paras);
}, },
deleteParas: function(i) { //删除第i个参数 deleteParas: function(i) { //删除第i个参数
this.nowNode["parameters"]["paras"].splice(i, 1); this.nowNode["parameters"]["paras"].splice(i, 1);

View File

@ -36,6 +36,16 @@ ws.onmessage = function(evt) {
}; };
function changeGetDataParameters(msg, i) {
msg["parameters"][i]["default"] = ""; //找不到元素时候的默认值
msg["parameters"][i]["beforeJS"] = ""; //执行前执行的js
msg["parameters"][i]["beforeJSWaitTime"] = 0; //执行前js等待时间
msg["parameters"][i]["JS"] = ""; //如果是JS需要执行的js
msg["parameters"][i]["JSWaitTime"] = 0; //JS等待时间
msg["parameters"][i]["afterJS"] = ""; //执行后执行的js
msg["parameters"][i]["afterJSWaitTime"] = 0; //执行后js等待时间
}
function handleAddElement(msg) { function handleAddElement(msg) {
if (msg["type"] == "openPage") { if (msg["type"] == "openPage") {
addElement(1, msg); addElement(1, msg);
@ -51,8 +61,9 @@ function handleAddElement(msg) {
addElement(8, msg); addElement(8, msg);
addElement(2, msg); addElement(2, msg);
} else if (msg["type"] == "singleCollect" || msg["type"] == "multiCollectNoPattern") { } else if (msg["type"] == "singleCollect" || msg["type"] == "multiCollectNoPattern") {
if (app._data.nowNode != null && app._data["nowNode"]["option"] == 3) { //如果当前点击的动作就是提取数据 if (app._data.nowNode != null && app._data["nowNode"]["option"] == 3) { //如果现在节点就是提取数据节点,直接在此节点添加参数,而不是生成一个新的提取数据节点
for (let i = 0; i < msg["parameters"].length; i++) { for (let i = 0; i < msg["parameters"].length; i++) {
changeGetDataParameters(msg, i);
app._data["nowNode"]["parameters"]["paras"].push(msg["parameters"][i]); app._data["nowNode"]["parameters"]["paras"].push(msg["parameters"][i]);
} }
app._data.paras.parameters = app._data["nowNode"]["parameters"]["paras"]; app._data.paras.parameters = app._data["nowNode"]["parameters"]["paras"];
@ -194,13 +205,7 @@ function modifyParameters(t, para) {
} }
} else if (t.option == 3) { //采集数据 } else if (t.option == 3) { //采集数据
for (let i = 0; i < para["parameters"].length; i++) { for (let i = 0; i < para["parameters"].length; i++) {
para["parameters"][i]["default"] = ""; //找不到元素时候的默认值 changeGetDataParameters(para, i);
para["parameters"][i]["beforeJS"] = ""; //执行前执行的js
para["parameters"][i]["beforeJSWaitTime"] = 0; //执行前js等待时间
para["parameters"][i]["JS"] = ""; //如果是JS需要执行的js
para["parameters"][i]["JSWaitTime"] = 0; //JS等待时间
para["parameters"][i]["afterJS"] = ""; //执行后执行的js
para["parameters"][i]["afterJSWaitTime"] = 0; //执行后js等待时间
} }
t["parameters"]["paras"] = para["parameters"]; t["parameters"]["paras"] = para["parameters"];
} }

View File

@ -16,7 +16,7 @@ A visual code-free/no-code web crawler/spider, just select the content you want
## 下载 EasySpider/Download EasySpider ## 下载 EasySpider/Download EasySpider
进入 [Releases Page](https://github.com/NaiboWang/EasySpider/releases) 下载最新版本。如果下载速度慢,可以考虑从以下页面进入中国境内下载地址:[中国境内下载地址](https://github.com/NaiboWang/EasySpider/releases/download/v0.2.0/Download_Link_Address_in_China_Mainland.txt) 进入 [Releases Page](https://github.com/NaiboWang/EasySpider/releases) 下载最新版本。如果下载速度慢,可以考虑从以下页面进入中国境内下载地址:[中国境内下载地址](https://github.com/NaiboWang/EasySpider/releases/download/v0.2.0/Download_Link_Address_in_China_Mainland.txt)
加QQ群从群文件下载也是一种方式但使用软件的过程中发生了问题求助还是请从github提issue因为群主不怎么看群群号**682921940**。 加QQ群从群文件下载也是一种方式但使用软件的过程中发生了问题求助还是请从github提issue因为群主不怎么看群群号**682921940**。
@ -24,14 +24,18 @@ Refer to the [Releases Page](https://github.com/NaiboWang/EasySpider/releases) t
## 声明/Declaration ## 声明/Declaration
本软件仅供学习交流使用,**严禁使用软件进行任何违法违规的操作,如爬取不允许爬取的政府军事机关网站等**。使用本软件所造成的一切后果由使用者自负,作者不负任何责任。同时,软件受到专利权保护,如要用于商业用途,请联系**浙江大学天道专利事务所**进行付费等操作 本软件仅供学习交流使用,**严禁使用软件进行任何违法违规的操作,如爬取不允许爬取的政府军事机关网站等**。使用本软件所造成的**一切后果由使用者自负,作者不负任何责任**。
This software is for learning and communication only. **It is strictly forbidden to use the software for any illegal operations, such as crawling government military websites that are not allowed to be crawled.** All consequences caused by the use of this software are at the user's own risk, and the author is not responsible for any consequences. At the same time, the software is protected by patent rights. If you want to use it for commercial purposes, please contact **Zhejiang University Tiandao Patent Office** for payment and other operations. This software is for learning and communication only. **It is strictly forbidden to use the software for any illegal operations, such as crawling government military websites that are not allowed to be crawled.** All consequences caused by the use of this software are at the user's own risk, and the author is not responsible for any consequences.
对于政府和军事机关等网站的爬虫操作,**作者将不会进行任何答疑**,以免触碰国家相关法律法规和政策。 对于政府和军事机关等网站的爬虫操作,**作者将不会进行任何答疑**,以免触碰国家相关法律法规和政策。
For crawler operations on government and military websites, the author will not answer any questions to avoid touching relevant national laws, regulations and policies. For crawler operations on government and military websites, the author will not answer any questions to avoid touching relevant national laws, regulations and policies.
同时,软件受到专利权保护,如要用于商业用途,请联系[浙江大学天道专利事务所](media/patent.png)进行付费等操作。
At the same time, the software is protected by patent rights. If you want to use it for commercial purposes, please contact [Zhejiang University Tiandao Patent Office](media/patent.png) for payment and other operations.
## 文档/Documentation ## 文档/Documentation
请点此进入[教程文档](https://github.com/NaiboWang/EasySpider/wiki),如有英文可暂时翻译一下,或看作者的[硕士毕业论文](Docs/%E9%9D%A2%E5%90%91WEB%E5%BA%94%E7%94%A8%E7%9A%84%E6%99%BA%E8%83%BD%E5%8C%96%E6%9C%8D%E5%8A%A1%E5%B0%81%E8%A3%85%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1%E4%B8%8E%E5%AE%9E%E7%8E%B0.pdf)(主要看第三章和第五章)。 请点此进入[教程文档](https://github.com/NaiboWang/EasySpider/wiki),如有英文可暂时翻译一下,或看作者的[硕士毕业论文](Docs/%E9%9D%A2%E5%90%91WEB%E5%BA%94%E7%94%A8%E7%9A%84%E6%99%BA%E8%83%BD%E5%8C%96%E6%9C%8D%E5%8A%A1%E5%B0%81%E8%A3%85%E7%B3%BB%E7%BB%9F%E8%AE%BE%E8%AE%A1%E4%B8%8E%E5%AE%9E%E7%8E%B0.pdf)(主要看第三章和第五章)。