浏览代码

Change min save item amount

naibo 2 年之前
父节点
当前提交
6c0becdf09

+ 2 - 2
ElectronJS/package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "easy-spider",
-  "version": "0.3.1",
+  "version": "0.3.2",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "easy-spider",
-      "version": "0.3.1",
+      "version": "0.3.2",
       "license": "GPL-3.0",
       "dependencies": {
         "electron-squirrel-startup": "^1.0.0",

+ 2 - 2
ElectronJS/package.json

@@ -1,7 +1,7 @@
 {
   "name": "easy-spider",
   "productName": "EasySpider",
-  "version": "0.3.1",
+  "version": "0.3.2",
   "icon": "./favicon",
   "description": "NoCode Visual Web Crawler",
   "main": "main.js",
@@ -60,7 +60,7 @@
       ],
       "packagerConfig": {
         "icon": "./favicon",
-        "appVersion": "0.3.1",
+        "appVersion": "0.3.2",
         "name": "EasySpider",
         "executableName": "EasySpider",
         "appCopyright": "Naibo Wang ([email protected])",

+ 1 - 1
ElectronJS/src/index.html

@@ -40,7 +40,7 @@
 
         <p><a @click="changeLang('en')" class="btn btn-outline-primary btn-lg"
               style="margin-top: 15px; width: 300px;height:60px;padding-top:12px;">English</a></p>
-        <p style="font-size: 17px">当前版本/Current Version: v0.3.1</p>
+        <p style="font-size: 17px">当前版本/Current Version: v0.3.2</p>
         <p style="font-size: 17px"><a href="https://github.com/NaiboWang/EasySpider/releases" target="_blank">Github</a>最新版本/Newest Version:<b>{{newest_version}}</b></p>
 <!--        <p>如发现新版本更新,可从以下Github仓库下载最新版本使用/If a new version is found, you can download the latest version from the following Github repository:</p>-->
 <!--        <p></p>-->

+ 1 - 1
ElectronJS/src/taskGrid/invokeTask.html

@@ -113,7 +113,7 @@
                 <input type="text" class="form-control" v-model="user_data_folder"></input>
             </div>
         </form>
-
+        <label>{{"Click the button below to execute the task. Manual intervention is possible during the task execution process, ~点击以下按钮执行任务,任务执行过程中可以" | lang }}<b>{{"~人工干预," | lang}}</b>{{"such as manually input a password or captcha (Note: set a waiting time in the task flow for manual intervention): ~如手动输入密码,验证码等(注意任务流程中设定好操作后的等待时间以用来手工干预):" | lang}}</label>
         <button class="btn btn-primary" v-on:click="localExecuteInstant(false)">{{"Directly Run Locally (Clean Mode)~本地直接执行(纯净模式)" |
             lang}}
         </button>

+ 1 - 1
ElectronJS/src/taskGrid/logic.js

@@ -401,7 +401,7 @@ function saveService(type) {
             "url": url,
             "links": links,
             "create_time": new Date().toLocaleString(),
-            "version": "0.3.1",
+            "version": "0.3.2",
             "containJudge": containJudge,
             "desc": serviceDescription,
             "inputParameters": inputParameters,

+ 1 - 1
ElectronJS/src/taskGrid/logic_CN.js

@@ -401,7 +401,7 @@ function saveService(type) {
             "url": url,
             "links": links,
             "create_time": new Date().toLocaleString(),
-            "version": "0.3.1",
+            "version": "0.3.2",
             "containJudge": containJudge,
             "desc": serviceDescription,
             "inputParameters": inputParameters,

+ 1 - 1
ExecuteStage/.vscode/launch.json

@@ -2,7 +2,7 @@
     // Use IntelliSense to learn about possible attributes.
     // Hover to view descriptions of existing attributes.
     // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
-    "version": "0.3.1",
+    "version": "0.3.2",
     "configurations": [
         {
             "name": "Python: EasySpider",

+ 18 - 15
ExecuteStage/easyspider_executestage.py

@@ -130,14 +130,17 @@ class BrowserThread(Thread):
         print("任务名称:", service["name"])
         self.procedure = service["graph"]  # 程序执行流程
         try:
-            if service["version"] != version:
-                print("版本不一致,请使用" + service["version"] + "版本的EasySpider运行该任务")
-                print("Version not match, please use EasySpider " + service["version"] + " to run this task")
-                self.browser.quit()
-                sys.exit()
-        except:
-            print("版本不一致,请使用v0.2.0版本的EasySpider运行该任务")
-            print("Version not match, please use EasySpider v0.2.0 to run this task")
+            if service["version"] >= "0.3.1": # 0.3.1及以上版本以上的EasySpider兼容从0.3.1版本开始的所有版本
+                pass
+            else: # 0.3.1以下版本的EasySpider不兼容0.3.1及以上版本的EasySpider
+                if service["version"] != version:
+                    print("版本不一致,请使用" + service["version"] + "版本的EasySpider运行该任务!")
+                    print("Version not match, please use EasySpider " + service["version"] + " to run this task!")
+                    self.browser.quit()
+                    sys.exit()
+        except: # 0.2.0版本没有version字段,所以直接退出
+            print("版本不一致,请使用v0.2.0版本的EasySpider运行该任务!")
+            print("Version not match, please use EasySpider v0.2.0 to run this task!")
             self.browser.quit()
             sys.exit()
         self.links = list(filter(isnull, service["links"].split("\n")))  # 要执行的link的列表
@@ -189,7 +192,7 @@ class BrowserThread(Thread):
     #     sys.exit(0)
 
     def saveData(self, exit=False):
-        if exit == True or len(self.OUTPUT) >= 100: # 每100条保存一次
+        if exit == True or len(self.OUTPUT) >= 10: # 每10条保存一次
             with open("Data/"+ self.saveName + '_log.txt', 'a', encoding='utf-8-sig') as file_obj:
                 file_obj.write(self.log)
                 file_obj.close()
@@ -950,25 +953,25 @@ class BrowserThread(Thread):
                 self.execute_code(2, p["beforeJS"], p["beforeJSWaitTime"], element) # 执行前置js
                 content = self.get_content(p, element)
             except StaleElementReferenceException:  # 发生找不到元素的异常后,等待几秒重新查找
-                self.recordLog('StaleElementReferenceException'+p["relativeXPath"])
+                self.recordLog('StaleElementReferenceException: '+p["relativeXPath"])
                 time.sleep(3)
                 try:
                     if p["relative"]:  # 是否相对xpath
                         if p["relativeXPath"] == "":  # 相对xpath有时候就是元素本身,不需要二次查找
                             element = loopElement
-                            self.recordLog('StaleElementReferenceExceptionloopElement')
+                            self.recordLog('StaleElementReferenceException: loopElement')
                         else:
                             element = loopElement.find_element(By.XPATH,
                                                             p["relativeXPath"][1:])
                             self.recordLog(
-                                'StaleElementReferenceExceptionloopElement+relativeXPath')
+                                'StaleElementReferenceException: loopElement+relativeXPath')
                     else:
                         element = self.browser.find_element(
                             By.XPATH, p["relativeXPath"])
-                        self.recordLog('StaleElementReferenceExceptionrelativeXPath')
+                        self.recordLog('StaleElementReferenceException: relativeXPath')
                     content = self.get_content(p, element)
                 except StaleElementReferenceException:
-                    self.recordLog('StaleElementReferenceException'+p["relativeXPath"])
+                    self.recordLog('StaleElementReferenceException: '+p["relativeXPath"])
                     continue  # 再出现类似问题直接跳过
             self.outputParameters[p["name"]] = content
             self.execute_code(2, p["afterJS"], p["afterJSWaitTime"], element) # 执行后置JS
@@ -991,7 +994,7 @@ if __name__ == '__main__':
         "read_type": "remote",
         "headless": False,
         "server_address": "http://localhost:8074",
-        "version": "0.3.1",
+        "version": "0.3.2",
     }
     c = Config(config)
     print(c)

+ 1 - 1
Extension/manifest_v3/package.json

@@ -1,6 +1,6 @@
 {
   "name": "EasySpider",
-  "version": "0.3.1",
+  "version": "0.3.2",
   "type": "module",
   "scripts": {
     "build": "rollup -c",

+ 1 - 1
Extension/manifest_v3/src/manifest.json

@@ -1,6 +1,6 @@
 {
   "name": "EasySpider",
-  "version": "0.3.1",
+  "version": "0.3.2",
   "description": "EasySpider's chrome extension",
   "author": "Naibo Wang",
   "manifest_version": 3,

文件差异内容过多而无法显示
+ 0 - 0
Releases/EasySpider_windows_amd64/execution_instances/0.json


文件差异内容过多而无法显示
+ 0 - 0
Releases/EasySpider_windows_amd64/execution_instances/1.json


文件差异内容过多而无法显示
+ 0 - 0
Releases/EasySpider_windows_amd64/execution_instances/2.json


文件差异内容过多而无法显示
+ 0 - 0
Releases/EasySpider_windows_amd64/execution_instances/3.json


文件差异内容过多而无法显示
+ 0 - 0
Releases/EasySpider_windows_amd64/execution_instances/4.json


文件差异内容过多而无法显示
+ 0 - 0
Releases/EasySpider_windows_amd64/execution_instances/5.json


文件差异内容过多而无法显示
+ 0 - 0
Releases/EasySpider_windows_amd64/execution_instances/6.json


文件差异内容过多而无法显示
+ 0 - 0
Releases/EasySpider_windows_amd64/tasks/26.json


文件差异内容过多而无法显示
+ 0 - 0
Releases/EasySpider_windows_amd64/tasks/27.json


部分文件因为文件数量过多而无法显示