Parcourir la source

爬虫更新上架修改爬虫内存参数

maxiaoshan il y a 2 ans
Parent
commit
7af70dd0ca
7 fichiers modifiés avec 729 ajouts et 71 suppressions
  1. 570 0
      src/logs/spider.log
  2. 3 2
      src/main.go
  3. 1 1
      src/mainT.go
  4. 126 38
      src/spider/handler.go
  5. 1 1
      src/spider/history.go
  6. 14 14
      src/spider/spider.go
  7. 14 15
      src/spider/store.go

+ 570 - 0
src/logs/spider.log

@@ -191620,3 +191620,573 @@ stack traceback:
 2022/12/06 10:58:56 handler.go:142: info  总共加载脚本数: 1
 2022/12/06 10:58:56 spider.go:777: info  Running Code: sd_zgsdzfcgw_sxzhbgg_new_bu Stop: false
 2022/12/06 10:58:56 spider.go:843: info  Thread Info:	Code: sd_zgsdzfcgw_sxzhbgg_new_bu 	count: 2944 	thread num: 10
+2022/12/16 09:30:25 main.go:139: debug  7400
+2022/12/16 09:30:25 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/16 09:30:25 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:30:25 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:30:25 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 30 , 150
+2022/12/16 09:30:25 handler.go:136: info  高性能模式:LUA加载完成
+2022/12/16 09:30:25 handler.go:142: info  总共加载脚本数: 1
+2022/12/16 09:30:29 main.go:139: debug  7400
+2022/12/16 09:30:29 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/16 09:30:29 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:30:39 main.go:139: debug  7400
+2022/12/16 09:30:39 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/16 09:30:39 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:30:39 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:32:18 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/16 09:34:59 main.go:139: debug  7400
+2022/12/16 09:34:59 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/16 09:34:59 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:34:59 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:36:30 main.go:139: debug  7400
+2022/12/16 09:36:30 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/16 09:36:30 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:36:30 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:37:17 main.go:139: debug  7400
+2022/12/16 09:37:17 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/16 09:37:17 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:37:17 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:37:19 script.go:103: debug  hn_hnszfcgw_cgyx_sx,加载lua脚本错误:<string>:2: module json not found:
+	no field package.preload['json']
+	CreateFile .\json.lua: The system cannot find the file specified.
+	CreateFile D:\Work\project\spider_lua\src\lua\json.lua: The system cannot find the path specified.
+	CreateFile D:\Work\project\spider_lua\src\lua\json\init.lua: The system cannot find the path specified., 
+stack traceback:
+	[G]: in function 'require'
+	<string>:2: in main chunk
+	[G]: ?
+2022/12/16 09:37:31 main.go:139: debug  7400
+2022/12/16 09:37:31 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/16 09:37:31 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:37:31 handler.go:405: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 09:37:34 script.go:103: debug  hn_hnszfcgw_cgyx_sx,加载lua脚本错误:<string>:2: module json not found:
+	no field package.preload['json']
+	CreateFile .\json.lua: The system cannot find the file specified.
+	CreateFile D:\Work\project\spider_lua\src\lua\json.lua: The system cannot find the path specified.
+	CreateFile D:\Work\project\spider_lua\src\lua\json\init.lua: The system cannot find the path specified., 
+stack traceback:
+	[G]: in function 'require'
+	<string>:2: in main chunk
+	[G]: ?
+2022/12/16 13:45:42 spider.go:1090: info  Detail Download All Thread: 0
+2022/12/16 13:45:42 main.go:141: debug  7400
+2022/12/16 13:45:42 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:45:42 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:45:42 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 30 , 150
+2022/12/16 13:45:42 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 13:45:42 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 13:45:51 spider.go:1090: info  Detail Download All Thread: 0
+2022/12/16 13:45:51 main.go:141: debug  7400
+2022/12/16 13:45:51 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:45:51 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:45:51 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 30 , 150
+2022/12/16 13:45:51 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 13:45:51 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 13:46:29 main.go:141: debug  7400
+2022/12/16 13:46:29 spider.go:1090: info  Detail Download All Thread: 0
+2022/12/16 13:46:29 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:46:29 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:46:29 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 30 , 150
+2022/12/16 13:46:29 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 13:46:29 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 13:46:45 main.go:141: debug  7400
+2022/12/16 13:46:45 spider.go:1090: info  Detail Download All Thread: 0
+2022/12/16 13:46:45 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:46:45 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:46:48 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 30 , 150
+2022/12/16 13:46:48 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 13:46:48 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 13:46:59 main.go:141: debug  7400
+2022/12/16 13:46:59 spider.go:1090: info  Detail Download All Thread: 0
+2022/12/16 13:46:59 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:46:59 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:47:54 main.go:141: debug  7400
+2022/12/16 13:47:54 spider.go:1090: info  Detail Download All Thread: 0
+2022/12/16 13:47:54 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:47:54 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:48:02 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 13:48:02 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 30 , 150
+2022/12/16 13:48:02 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 13:49:15 main.go:141: debug  7400
+2022/12/16 13:49:15 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 13:49:15 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:49:15 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:49:15 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 30 , 150
+2022/12/16 13:49:15 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 13:49:15 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 13:49:15 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 13:50:15 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 13:50:33 main.go:141: debug  7400
+2022/12/16 13:50:33 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 13:50:33 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:50:33 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 13:50:33 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 13:50:33 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 13:50:33 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 13:50:33 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 13:51:33 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 13:51:33 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 13:51:33 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 13:52:33 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 13:52:33 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 13:52:33 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 13:53:32 handler.go:417: info  下架脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 13:53:32 handler.go:466: info  hn_hnszfcgw_cgyx_sx 脚本下架成功
+2022/12/16 13:53:32 handler.go:716: info  上下架: true <nil>
+2022/12/16 13:53:32 handler.go:552: info  上架新增脚本,库中是否已存在该脚本: hn_hnszfcgw_cgyx_sx true true
+2022/12/16 13:53:32 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 2 , 150
+2022/12/16 13:53:32 handler.go:644: info  上架新增脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 13:53:32 handler.go:699: info  Allspiders2上架新增脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 13:53:32 handler.go:716: info  上下架: true <nil>
+2022/12/16 13:53:32 spider.go:780: info  Running Code: hn_hnszfcgw_cgyx_sx Stop: false
+2022/12/16 13:53:32 spider.go:846: info  Thread Info:	Code: hn_hnszfcgw_cgyx_sx 	count: 1 	thread num: 0
+2022/12/16 13:53:32 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 13:53:33 spider.go:1091: info  Detail Download All Thread: 1
+2022/12/16 13:53:33 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 13:53:33 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 13:54:33 spider.go:1091: info  Detail Download All Thread: 1
+2022/12/16 13:55:32 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 2 , 150
+2022/12/16 13:55:32 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 13:55:33 spider.go:1091: info  Detail Download All Thread: 1
+2022/12/16 13:56:07 download.go:68: error  hn_hnszfcgw_cgyx_sx方法DownloadAdv,url:http://www.ccgp-hunan.gov.cn/mvc/viewContent.do?columnId=29245,err:timeout 150
+2022/12/16 13:56:33 spider.go:1091: info  Detail Download All Thread: 1
+2022/12/16 13:57:32 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 2 , 150
+2022/12/16 13:57:32 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 13:57:33 spider.go:1091: info  Detail Download All Thread: 1
+2022/12/16 13:58:33 spider.go:1091: info  Detail Download All Thread: 1
+2022/12/16 13:58:39 download.go:68: error  hn_hnszfcgw_cgyx_sx方法DownloadAdv,url:http://www.ccgp-hunan.gov.cn/mvc/viewContent.do?columnId=29245,err:timeout 150
+2022/12/16 13:59:32 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 2 , 150
+2022/12/16 13:59:32 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 13:59:33 spider.go:1091: info  Detail Download All Thread: 1
+2022/12/16 14:00:24 handler.go:552: info  上架新增脚本,库中是否已存在该脚本: hn_hnszfcgw_cgyx_sx true true
+2022/12/16 14:00:33 spider.go:1091: info  Detail Download All Thread: 1
+2022/12/16 14:01:11 download.go:68: error  hn_hnszfcgw_cgyx_sx方法DownloadAdv,url:http://www.ccgp-hunan.gov.cn/mvc/viewContent.do?columnId=29245,err:timeout 150
+2022/12/16 14:01:32 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 2 , 150
+2022/12/16 14:01:32 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:01:33 spider.go:1091: info  Detail Download All Thread: 1
+2022/12/16 14:08:18 main.go:141: debug  7400
+2022/12/16 14:08:18 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:08:18 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:08:18 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:08:18 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:08:18 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:08:19 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 14:08:19 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 14:09:18 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:09:18 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:09:18 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:09:24 handler.go:552: info  上架新增脚本,库中是否已存在该脚本: hn_hnszfcgw_cgyx_sx true true
+2022/12/16 14:09:24 handler.go:632: info  上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 14:09:24 handler.go:685: info  Allspiders2上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 14:09:24 handler.go:716: info  上下架: true <nil>
+2022/12/16 14:10:18 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:10:18 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 2 , 150
+2022/12/16 14:10:18 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:11:18 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:12:18 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:12:19 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 2 , 150
+2022/12/16 14:12:19 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:13:31 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:13:31 main.go:141: debug  7400
+2022/12/16 14:13:31 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:13:31 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:13:31 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:13:31 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:13:31 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 14:13:31 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 14:13:39 main.go:141: debug  7400
+2022/12/16 14:13:39 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:13:39 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:13:39 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:13:39 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:13:39 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:13:39 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 14:13:39 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 14:14:39 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:14:39 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:14:39 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:21:07 main.go:141: debug  7400
+2022/12/16 14:21:07 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:21:07 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:23:47 main.go:141: debug  7400
+2022/12/16 14:23:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:23:47 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:23:47 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:23:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:23:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:23:47 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 14:23:47 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 14:24:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:24:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:24:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:25:20 handler.go:552: info  上架新增脚本,库中是否已存在该脚本: hn_hnszfcgw_cgyx_sx true true
+2022/12/16 14:25:20 handler.go:632: info  上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 14:25:20 handler.go:685: info  Allspiders2上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 14:25:20 handler.go:716: info  上下架: true <nil>
+2022/12/16 14:25:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:25:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 2 , 150
+2022/12/16 14:25:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:26:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:27:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:27:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 2 , 150
+2022/12/16 14:27:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:28:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:29:03 handler.go:552: info  上架新增脚本,库中是否已存在该脚本: hn_hnszfcgw_cgyx_sx true true
+2022/12/16 14:29:03 handler.go:632: info  上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 14:29:03 handler.go:685: info  Allspiders2上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 14:29:03 handler.go:716: info  上下架: true <nil>
+2022/12/16 14:29:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:29:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:29:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:30:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:30:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:30:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:31:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:31:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:31:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:32:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:32:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:32:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:33:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:33:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:33:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:34:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:34:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:34:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:35:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:35:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:35:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:36:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:36:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:36:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:37:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:37:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:37:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:38:47 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:38:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:38:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:38:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:39:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:39:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:39:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:40:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:40:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:40:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:41:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:41:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:41:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:42:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:42:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:42:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:43:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:43:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:43:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:44:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:44:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:44:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:45:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:45:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:45:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:46:47 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:46:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:46:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:47:50 main.go:141: debug  7400
+2022/12/16 14:47:50 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:47:50 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:47:50 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 14:47:50 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:47:50 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:47:50 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 14:47:50 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 14:48:50 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:48:50 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:48:50 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:49:50 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:49:50 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:49:50 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:50:50 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:50:50 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:50:50 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:51:50 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:51:50 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:51:50 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:52:50 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:52:50 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:52:50 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 14:52:56 handler.go:552: info  上架新增脚本,库中是否已存在该脚本: hn_hnszfcgw_cgyx_sx true true
+2022/12/16 14:52:56 handler.go:632: info  上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 14:52:56 handler.go:685: info  Allspiders2上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 14:52:56 handler.go:716: info  上下架: true <nil>
+2022/12/16 14:53:50 spider.go:1091: info  Detail Download All Thread: 0
+2022/12/16 14:53:50 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 14:53:50 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:07:12 main.go:141: debug  7400
+2022/12/16 15:07:12 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/16 15:07:12 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:07:12 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:07:12 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:07:12 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:07:12 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 15:07:12 spider.go:767: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/12/16 15:07:12 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 15:07:28 main.go:141: debug  7400
+2022/12/16 15:07:28 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/16 15:07:28 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:07:28 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:07:28 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:07:28 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:07:28 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 15:07:28 spider.go:767: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/12/16 15:07:28 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 15:07:38 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/16 15:07:38 main.go:141: debug  7400
+2022/12/16 15:07:38 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:07:38 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:07:38 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:07:38 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:07:38 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 15:07:38 spider.go:767: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/12/16 15:07:38 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 15:07:47 main.go:141: debug  7400
+2022/12/16 15:07:47 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/16 15:07:47 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:07:47 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:07:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:07:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:07:47 spider.go:767: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/12/16 15:07:47 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 15:07:47 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 15:08:47 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/16 15:08:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:08:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:09:47 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/16 15:09:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:09:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:10:09 handler.go:552: info  上架新增脚本,库中是否已存在该脚本: hn_hnszfcgw_cgyx_sx true true
+2022/12/16 15:10:09 handler.go:632: info  上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 15:10:09 handler.go:685: info  Allspiders2上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 15:10:09 handler.go:716: info  上下架: true <nil>
+2022/12/16 15:10:47 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/16 15:10:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:10:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:11:47 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/16 15:11:47 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:11:47 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:13:54 spider.go:1093: info  Detail Download All Thread: 0
+2022/12/16 15:13:54 main.go:141: debug  7400
+2022/12/16 15:13:54 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:13:54 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/16 15:13:54 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:13:54 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/16 15:13:54 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/16 15:13:54 spider.go:767: info  +++++++++++++++++++Download Detail+++++++++++++++++++
+2022/12/16 15:13:54 handler.go:144: info  总共加载脚本数: 1
+2022/12/16 15:14:25 handler.go:552: info  上架新增脚本,库中是否已存在该脚本: hn_hnszfcgw_cgyx_sx true true
+2022/12/16 15:14:25 handler.go:632: info  上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 15:14:25 handler.go:685: info  Allspiders2上架重载脚本 hn_hnszfcgw_cgyx_sx
+2022/12/16 15:14:25 handler.go:716: info  上下架: true <nil>
+2022/12/16 15:14:54 spider.go:1093: info  Detail Download All Thread: 0
+2022/12/16 15:14:54 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/16 15:14:54 spider.go:166: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 ok,本轮下载量: 0 ,轮询数据长度: 1 ,下线数量: 0 ,下线爬虫: []
+2022/12/19 09:08:35 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:08:35 main.go:140: debug  7400
+2022/12/19 09:08:35 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:08:35 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:09:05 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:09:05 main.go:140: debug  7400
+2022/12/19 09:09:05 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:09:05 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:09:09 handler.go:149: info  节能模式列表页
+2022/12/19 09:09:30 handler.go:160: warn  2022-12-19 09:09:30 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:09:30 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:09:39 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:09:39 main.go:140: debug  7400
+2022/12/19 09:09:39 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:09:39 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:09:39 handler.go:149: info  节能模式列表页
+2022/12/19 09:09:39 handler.go:160: warn  2022-12-19 09:09:39 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:09:39 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:09:39 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:09:40 handler.go:238: warn  2022-12-19 09:09:40 :下载列表页执行死循环,列表长度, 1 0 删除数量 0 执行完毕后数量统计: 1 0
+2022/12/19 09:09:40 handler.go:160: warn  2022-12-19 09:09:40 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:09:57 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: true
+2022/12/19 09:11:19 main.go:140: debug  7400
+2022/12/19 09:11:19 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:11:19 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:11:19 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:11:19 handler.go:149: info  节能模式列表页
+2022/12/19 09:11:19 handler.go:160: warn  2022-12-19 09:11:19 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:11:19 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:11:19 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:11:20 handler.go:238: warn  2022-12-19 09:11:20 :下载列表页执行死循环,列表长度, 1 0 删除数量 0 执行完毕后数量统计: 1 0
+2022/12/19 09:11:20 handler.go:160: warn  2022-12-19 09:11:20 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:11:24 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: true
+2022/12/19 09:12:37 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:12:37 main.go:140: debug  7400
+2022/12/19 09:12:37 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:12:37 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:12:37 handler.go:149: info  节能模式列表页
+2022/12/19 09:12:37 handler.go:160: warn  2022-12-19 09:12:37 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:12:51 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:13:04 main.go:140: debug  7400
+2022/12/19 09:13:04 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:13:04 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:13:04 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:13:04 handler.go:149: info  节能模式列表页
+2022/12/19 09:13:04 handler.go:160: warn  2022-12-19 09:13:04 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:13:10 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:13:10 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:13:11 handler.go:238: warn  2022-12-19 09:13:11 :下载列表页执行死循环,列表长度, 1 0 删除数量 0 执行完毕后数量统计: 1 0
+2022/12/19 09:13:11 handler.go:160: warn  2022-12-19 09:13:11 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:13:20 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: true
+2022/12/19 09:15:02 main.go:140: debug  7400
+2022/12/19 09:15:02 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:15:02 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:15:02 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:15:02 handler.go:149: info  节能模式列表页
+2022/12/19 09:15:02 handler.go:160: warn  2022-12-19 09:15:02 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:15:04 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:15:04 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:15:05 handler.go:238: warn  2022-12-19 09:15:05 :下载列表页执行死循环,列表长度, 1 0 删除数量 0 执行完毕后数量统计: 1 0
+2022/12/19 09:15:05 handler.go:160: warn  2022-12-19 09:15:05 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:15:48 main.go:140: debug  7400
+2022/12/19 09:15:48 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:15:48 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:15:48 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:15:48 handler.go:149: info  节能模式列表页
+2022/12/19 09:15:48 handler.go:160: warn  2022-12-19 09:15:48 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:15:54 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:16:59 main.go:140: debug  7400
+2022/12/19 09:16:59 spider.go:1089: info  Detail Download All Thread: 0
+2022/12/19 09:16:59 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:16:59 handler.go:407: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:16:59 handler.go:149: info  节能模式列表页
+2022/12/19 09:16:59 handler.go:160: warn  2022-12-19 09:16:59 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:17:37 main.go:140: debug  7400
+2022/12/19 09:17:37 spider.go:1089: info  Detail Download All Thread: 0
+2022/12/19 09:17:37 handler.go:408: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:17:37 handler.go:408: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:17:37 handler.go:149: info  节能模式列表页
+2022/12/19 09:17:37 handler.go:160: warn  2022-12-19 09:17:37 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:17:37 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:17:37 spider.go:182: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:18:04 main.go:140: debug  7400
+2022/12/19 09:18:04 spider.go:1089: info  Detail Download All Thread: 0
+2022/12/19 09:18:04 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:18:04 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:18:04 handler.go:149: info  节能模式列表页
+2022/12/19 09:18:04 handler.go:160: warn  2022-12-19 09:18:04 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:18:04 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:18:04 spider.go:182: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:20:10 spider.go:1090: info  Detail Download All Thread: 0
+2022/12/19 09:20:10 main.go:140: debug  7400
+2022/12/19 09:20:10 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:20:10 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:20:10 handler.go:149: info  节能模式列表页
+2022/12/19 09:20:10 handler.go:160: warn  2022-12-19 09:20:10 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:20:10 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:20:10 spider.go:182: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:20:53 main.go:140: debug  7400
+2022/12/19 09:20:53 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/19 09:20:53 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:20:53 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:20:53 handler.go:149: info  节能模式列表页
+2022/12/19 09:20:53 handler.go:160: warn  2022-12-19 09:20:53 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:20:53 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:20:53 spider.go:182: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:33:17 main.go:140: debug  7400
+2022/12/19 09:33:17 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/19 09:33:17 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:33:17 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:33:17 handler.go:149: info  节能模式列表页
+2022/12/19 09:33:17 handler.go:160: warn  2022-12-19 09:33:17 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:33:19 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:33:19 spider.go:182: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:33:42 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/19 09:33:42 main.go:140: debug  7400
+2022/12/19 09:33:42 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:33:42 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:33:42 handler.go:149: info  节能模式列表页
+2022/12/19 09:33:42 handler.go:160: warn  2022-12-19 09:33:42 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:33:42 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:33:42 spider.go:182: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:33:48 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/19 09:33:48 main.go:140: debug  7400
+2022/12/19 09:33:48 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:33:48 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:33:48 handler.go:149: info  节能模式列表页
+2022/12/19 09:33:48 handler.go:160: warn  2022-12-19 09:33:48 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:33:50 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:33:50 spider.go:182: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:34:22 handler.go:1406: info  更新心跳个数: 1
+2022/12/19 09:35:10 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/19 09:35:12 handler.go:240: warn  2022-12-19 09:35:12 :下载列表页执行死循环,列表长度, 1 0 删除数量 0 执行完毕后数量统计: 1 0
+2022/12/19 09:35:12 handler.go:160: warn  2022-12-19 09:35:12 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:35:12 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: true
+2022/12/19 09:36:17 main.go:140: debug  7400
+2022/12/19 09:36:17 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/19 09:36:17 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:36:17 handler.go:409: info  节点 7210 脚本文件爬虫数 0
+2022/12/19 09:36:17 handler.go:149: info  节能模式列表页
+2022/12/19 09:36:17 handler.go:160: warn  2022-12-19 09:36:17 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:36:18 handler.go:173: info  Code: hn_hnszfcgw_cgyx_sx Is Downloading List: false
+2022/12/19 09:36:18 spider.go:182: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:36:55 handler.go:1406: info  更新心跳个数: 1
+2022/12/19 09:37:22 spider.go:1092: info  Detail Download All Thread: 0
+2022/12/19 09:37:23 handler.go:240: warn  2022-12-19 09:37:23 :下载列表页执行死循环,列表长度, 1 0 删除数量 0 执行完毕后数量统计: 1 0
+2022/12/19 09:37:23 handler.go:160: warn  2022-12-19 09:37:23 :下载列表页执行死循环 初始化脚本数量: 1
+2022/12/19 09:44:06 main.go:140: debug  7400
+2022/12/19 09:44:06 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:44:06 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:44:06 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:44:06 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/19 09:44:06 handler.go:144: info  总共加载脚本数: 0
+2022/12/19 09:44:28 main.go:140: debug  7400
+2022/12/19 09:44:28 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:44:28 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:44:28 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:44:28 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/19 09:44:28 handler.go:144: info  总共加载脚本数: 0
+2022/12/19 09:44:43 main.go:140: debug  7400
+2022/12/19 09:44:43 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:44:43 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:44:43 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:44:43 spider.go:181: debug  hn_hnszfcgw_cgyx_sx 湖南省政府采购网 频率: 1 , 150
+2022/12/19 09:44:43 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/19 09:44:43 handler.go:144: info  总共加载脚本数: 1
+2022/12/19 09:48:15 main.go:140: debug  7400
+2022/12/19 09:48:15 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:48:15 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:48:15 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:48:15 spider.go:181: debug  a_zmygcgythpt_xbxx_zxgg 中煤易购采购一体化平台 频率: 30 , 150
+2022/12/19 09:48:15 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/19 09:48:15 handler.go:144: info  总共加载脚本数: 1
+2022/12/19 09:48:30 main.go:140: debug  7400
+2022/12/19 09:48:30 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:48:30 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:48:31 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:48:31 spider.go:181: debug  a_zmygcgythpt_xbxx_zxgg 中煤易购采购一体化平台 频率: 30 , 150
+2022/12/19 09:48:31 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/19 09:48:31 handler.go:144: info  总共加载脚本数: 1
+2022/12/19 09:48:44 main.go:140: debug  7400
+2022/12/19 09:48:44 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:48:44 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:48:44 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:48:44 spider.go:181: debug  a_zmygcgythpt_xbxx_zxgg 中煤易购采购一体化平台 频率: 30 , 150
+2022/12/19 09:48:44 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/19 09:48:44 handler.go:144: info  总共加载脚本数: 1
+2022/12/19 09:49:02 main.go:140: debug  7400
+2022/12/19 09:49:02 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:49:02 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:49:02 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:49:02 spider.go:181: debug  a_zmygcgythpt_xbxx_zxgg 中煤易购采购一体化平台 频率: 30 , 150
+2022/12/19 09:49:02 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/19 09:49:02 handler.go:144: info  总共加载脚本数: 1
+2022/12/19 09:49:31 main.go:140: debug  7400
+2022/12/19 09:49:31 spider.go:1088: info  Detail Download All Thread: 0
+2022/12/19 09:49:31 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:49:31 handler.go:407: info  节点 7400 脚本文件爬虫数 0
+2022/12/19 09:49:31 spider.go:181: debug  a_zmygcgythpt_xbxx_zxgg 中煤易购采购一体化平台 频率: 30 , 150
+2022/12/19 09:49:31 handler.go:138: info  高性能模式:LUA加载完成
+2022/12/19 09:49:31 handler.go:144: info  总共加载脚本数: 1

+ 3 - 2
src/main.go

@@ -122,8 +122,6 @@ func main() {
 	go spider.ReloadSpiderFile()
 	//内存信息
 	go heapprint()
-	//爬虫信息提交编辑器
-	go spider.SpiderInfoSend()
 	//查列表页信息采集三级页
 	go spider.DetailData()
 	//批量保存错误数据
@@ -134,6 +132,9 @@ func main() {
 	go spider.UpdateHeartInfo()
 	//7000历史节点下载详情页
 	go spider.HistoryEventDownloadDetail()
+
+	//爬虫信息提交编辑器
+	//go spider.SpiderInfoSend()
 	//保存爬虫采集非本站点数据
 	//go spider.SaveOtherSiteData()
 	logger.Debug(Config.Webport)

+ 1 - 1
src/mainT.go

@@ -24,7 +24,7 @@ func main1() {
 		name := arrs[len(arrs)-1]
 		if strings.HasPrefix(name, "spider_") && strings.HasSuffix(name, ".lua") {
 			bs, _ := ioutil.ReadAll(f)
-			sp, _ := spider.NewSpider("test", string(bs))
+			sp, _ := spider.CreateSpider("test", string(bs), true, false)
 			go sp.StartJob()
 			log.Println("成功加载脚本", testdir)
 		} else {

+ 126 - 38
src/spider/handler.go

@@ -5,6 +5,8 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
+	"github.com/cjoudrey/gluahttp"
+	lujson "github.com/yuin/gopher-json"
 	mu "mfw/util"
 	"net/http"
 	"net/url"
@@ -67,7 +69,7 @@ func NoQueueScript() {
 		if info, ok := temp.(map[string]string); ok {
 			code := info["code"]
 			script := info["script"]
-			sp, errstr := NewSpider(code, script)
+			sp, errstr := CreateSpider(code, script, true, false)
 			if errstr == "" && sp != nil && sp.Code != "nil" { //脚本加载成功
 				//sp.Index = qu.IntAll(key)
 				//sp2.Index = qu.IntAll(key)
@@ -91,7 +93,7 @@ func NoQueueScript() {
 				}
 
 				if util.Config.Modal == 1 { //列表页、三级页分开采集模式
-					sp2, _ := NewSpider(code, script)
+					sp2, _ := CreateSpider(code, script, true, false)
 					sp2.UserName = sp.UserName
 					sp2.UserEmail = sp.UserEmail
 					sp2.MUserName = sp.MUserName
@@ -171,7 +173,7 @@ func QueueUpScriptList() {
 				logger.Info("Code:", code, "Is Downloading List:", old_is_running)
 				if !old_is_running { //判断当前爬虫是否正在执行
 					script := info["script"]
-					sp, errstr := NewSpider_New(code, script, false)
+					sp, errstr := CreateSpider(code, script, false, false)
 					//logger.Info("初始化脚本是否成功:", sp != nil, e.Value)
 					if errstr == "" && sp != nil && sp.Code != "nil" { //初始化脚本成功
 						//sp.Index = qu.IntAll(key)
@@ -268,7 +270,7 @@ func QueueUpScriptDetail() {
 				logger.Info("Code:", code, "Is Downloading Detail:", old_is_running)
 				if !old_is_running { //判断当前爬虫是否正在执行
 					script := info["script"]
-					sp, errstr := NewSpider_New(code, script, true)
+					sp, errstr := CreateSpider(code, script, true, false)
 					if errstr == "" && sp != nil && sp.Code != "nil" { //初始化脚本成功
 						//sp.Index = qu.IntAll(key)
 						sp.UserName = info["createuser"]
@@ -618,32 +620,24 @@ func UpdateSpiderByCodeState(code, state string) (bool, error) {
 				if spd, ok := Allspiders.Load(k); ok { //对应脚本已存在,更新
 					sp := spd.(*Spider)
 					sp.ScriptFile = v["script"]
-					if v["createuser"] != "" {
-						sp.UserName = v["createuser"]
-					}
-					if v["createuseremail"] != "" {
-						sp.UserEmail = v["createuseremail"]
-					}
+					sp.UserName = v["createuser"]
+					sp.UserEmail = v["createuseremail"]
 					sp.MUserName = v["modifyuser"]
 					sp.MUserEmail = v["modifyemail"]
-					//sp.LoadScript(k, sp.ScriptFile, true) //更新上架,重载脚本
+					UpdateSpider(sp, k, v["script"]) //爬虫其他信息更新
+					//sp.LoadScript(&sp.Name, &sp.Channel, &sp.MUserName, k, sp.ScriptFile, true, false) //更新上架,重载脚本
 					Allspiders.Store(k, sp)
 					up = true
 					err = nil
 					logger.Info("上架重载脚本", sp.Code)
 				} else { //新增脚本
-					sp, errstr := NewSpider(k, v["script"])
+					sp, errstr := CreateSpider(k, v["script"], true, false)
 					if errstr == "" && sp != nil && sp.Code != "nil" {
-						if v["createuser"] != "" {
-							sp.UserName = v["createuser"]
-						}
-						if v["createuseremail"] != "" {
-							sp.UserEmail = v["createuseremail"]
-						}
+						sp.UserName = v["createuser"]
+						sp.UserEmail = v["createuseremail"]
 						sp.MUserName = v["modifyuser"]
 						sp.MUserEmail = v["modifyemail"]
 						Allspiders.Store(k, sp)
-						sp.Stop = false
 						sp.StartJob()
 						up = true
 						err = nil
@@ -678,14 +672,11 @@ func UpdateSpiderByCodeState(code, state string) (bool, error) {
 					if spd2, ok2 := Allspiders2.Load(k); ok2 { //对应脚本已存在,更新
 						sp2 := spd2.(*Spider)
 						sp2.ScriptFile = v["script"]
-						if v["createuser"] != "" {
-							sp2.UserName = v["createuser"]
-						}
-						if v["createuseremail"] != "" {
-							sp2.UserEmail = v["createuseremail"]
-						}
+						sp2.UserName = v["createuser"]
+						sp2.UserEmail = v["createuseremail"]
 						sp2.MUserName = v["modifyuser"]
 						sp2.MUserEmail = v["modifyemail"]
+						UpdateSpider(sp2, k, v["script"])                                                       //爬虫其他信息更新
 						sp2.LoadScript(&sp2.Name, &sp2.Channel, &sp2.MUserName, k, sp2.ScriptFile, true, false) //更新上架,重载脚本
 						Allspiders2.Store(k, sp2)                                                               //重载后放入集合
 						UpdateHighListDataByCode(k)                                                             //爬虫更新上架后,重置数据state=0
@@ -693,14 +684,10 @@ func UpdateSpiderByCodeState(code, state string) (bool, error) {
 						// err = nil
 						logger.Info("Allspiders2上架重载脚本", sp2.Code)
 					} else { //新增脚本
-						sp2, errstr := NewSpider(k, v["script"])
+						sp2, errstr := CreateSpider(k, v["script"], true, false)
 						if errstr == "" && sp2 != nil && sp2.Code != "nil" {
-							if v["createuser"] != "" {
-								sp2.UserName = v["createuser"]
-							}
-							if v["createuseremail"] != "" {
-								sp2.UserEmail = v["createuseremail"]
-							}
+							sp2.UserName = v["createuser"]
+							sp2.UserEmail = v["createuseremail"]
 							sp2.MUserName = v["modifyuser"]
 							sp2.MUserEmail = v["modifyemail"]
 							sp2.Stop = false
@@ -762,12 +749,12 @@ func ReloadSpiderFile() {
 						//	return true
 						//})
 						LoopListPath.Store(k, v) //排队模式Allspiders,Allspiders2共用一个LoopListPath,新增一次即可
-						sp, errstr = NewSpider_New(k, v["script"], false)
+						sp, errstr = CreateSpider(k, v["script"], false, false)
 					} else {
-						sp, errstr = NewSpider_New(k, v["script"], true)
+						sp, errstr = CreateSpider(k, v["script"], true, false)
 					}
 				} else {
-					sp, errstr = NewSpider(k, v["script"])
+					sp, errstr = CreateSpider(k, v["script"], true, false)
 				}
 				if errstr == "" && sp != nil && sp.Code != "nil" {
 					if v["createuser"] != "" {
@@ -844,7 +831,7 @@ func ReloadSpiderFile() {
 		// 			return true
 		// 		})
 		// 		LoopListPath.Store(length, v)
-		// 		sp = NewSpider_New(k, v["script"], false)
+		// 		sp = CreateSpider(k, v["script"], false,false)
 		// 	} else {
 		// 		sp = NewSpider(k, v["script"])
 		// 	}
@@ -885,6 +872,108 @@ func ReloadSpiderFile() {
 	util.TimeAfterFunc(time.Duration(15)*time.Minute, ReloadSpiderFile, TimeChan)
 }
 
+//生成爬虫
+func CreateSpider(code, luafile string, newstate, thread bool) (*Spider, string) {
+	defer mu.Catch()
+	spider := &Spider{}
+	err := spider.LoadScript(&spider.Name, &spider.Channel, &spider.MUserName, code, luafile, newstate, thread)
+	if err != "" {
+		return nil, err
+	}
+	spider.Code = spider.GetVar("spiderCode")
+	spider.SCode = spider.Code
+	spider.Name = spider.GetVar("spiderName")
+	spider.Channel = spider.GetVar("spiderChannel")
+
+	//spider.LastExecTime = GetLastExectime(spider.Code)
+	spider.DownDetail = spider.GetBoolVar("spiderDownDetailPage")
+	spider.Collection = spider.GetVar("spider2Collection")
+	spider.SpiderRunRate = int64(spider.GetIntVar("spiderRunRate"))
+	//spider.Thread = int64(spider.GetIntVar("spiderThread"))
+	spider.StoreToMsgEvent = spider.GetIntVar("spiderStoreToMsgEvent")
+	spider.StoreMode = spider.GetIntVar("spiderStoreMode")
+	spider.CoverAttr = spider.GetVar("spiderCoverAttr")
+	spiderSleepBase := spider.GetIntVar("spiderSleepBase")
+	if spiderSleepBase == -1 {
+		spider.SleepBase = 1000
+	} else {
+		spider.SleepBase = spiderSleepBase
+	}
+	spiderSleepRand := spider.GetIntVar("spiderSleepRand")
+	if spiderSleepRand == -1 {
+		spider.SleepRand = 1000
+	} else {
+		spider.SleepRand = spiderSleepRand
+	}
+	spiderTimeout := spider.GetIntVar("spiderTimeout")
+	if spiderTimeout == -1 {
+		spider.Timeout = 60
+	} else {
+		spider.Timeout = int64(spiderTimeout)
+	}
+	spider.TargetChannelUrl = spider.GetVar("spiderTargetChannelUrl")
+	spider.UserName = spider.GetVar("spiderUserName")
+	spider.UserEmail = spider.GetVar("spiderUserEmail")
+	spider.UploadTime = spider.GetVar("spiderUploadTime")
+	//新增历史补漏
+	//qu.Debug("-------", spider.GetBoolVar("spiderIsHistoricalMend"), spider.GetBoolVar("spiderIsMustDownload"))
+	spider.IsHistoricalMend = spider.GetBoolVar("spiderIsHistoricalMend")
+	spider.IsMustDownload = spider.GetBoolVar("spiderIsMustDownload")
+	//新老爬虫
+	spider.IsCompete = spider.GetBoolVar("spiderIsCompete")
+	return spider, ""
+}
+
+//更新爬虫
+func UpdateSpider(spider *Spider, code, script string) {
+	ts := &Spider{}
+	ts.Script.L = lua.NewState(lua.Options{
+		RegistrySize:        256 * 20,
+		CallStackSize:       256,
+		IncludeGoStackTrace: false,
+	})
+	defer ts.L.Close()
+	ts.Script.L.PreloadModule("http", gluahttp.NewHttpModule(&http.Client{}).Loader)
+	ts.Script.L.PreloadModule("json", lujson.Loader)
+	if err := ts.Script.L.DoString(script); err != nil {
+		logger.Debug(code + ",加载lua脚本错误:" + err.Error())
+		return
+	}
+	spider.Channel = ts.GetVar("spiderChannel")                    //栏目名称
+	spider.DownDetail = ts.GetBoolVar("spiderDownDetailPage")      //是否下三级页
+	spider.Collection = ts.GetVar("spider2Collection")             //存储表
+	spider.SpiderRunRate = int64(ts.GetIntVar("spiderRunRate"))    //间隔时间
+	spider.StoreToMsgEvent = ts.GetIntVar("spiderStoreToMsgEvent") //4002
+	spider.StoreMode = ts.GetIntVar("spiderStoreMode")             //2
+	spider.CoverAttr = ts.GetVar("spiderCoverAttr")                //title
+	//下载三级页(DownloadDetailPage)随机延迟
+	spiderSleepBase := ts.GetIntVar("spiderSleepBase")
+	if spiderSleepBase == -1 {
+		spider.SleepBase = 1000
+	} else {
+		spider.SleepBase = spiderSleepBase
+	}
+	spiderSleepRand := ts.GetIntVar("spiderSleepRand")
+	if spiderSleepRand == -1 {
+		spider.SleepRand = 1000
+	} else {
+		spider.SleepRand = spiderSleepRand
+	}
+	spiderTimeout := ts.GetIntVar("spiderTimeout")
+	if spiderTimeout == -1 {
+		spider.Timeout = 60
+	} else {
+		spider.Timeout = int64(spiderTimeout)
+	}
+
+	spider.TargetChannelUrl = ts.GetVar("spiderTargetChannelUrl") //栏目地址
+	//新增历史补漏
+	spider.IsHistoricalMend = ts.GetBoolVar("spiderIsHistoricalMend")
+	spider.IsMustDownload = ts.GetBoolVar("spiderIsMustDownload")
+	//新老爬虫
+	spider.IsCompete = ts.GetBoolVar("spiderIsCompete")
+}
+
 //排队模式生成爬虫
 func NewSpider_New(code, luafile string, newstate bool) (*Spider, string) {
 	defer mu.Catch()
@@ -986,7 +1075,6 @@ func NewSpider(code, luafile string) (*Spider, string) {
 		spider.Timeout = int64(spiderTimeout)
 	}
 	spider.TargetChannelUrl = spider.GetVar("spiderTargetChannelUrl")
-
 	date := time.Unix(time.Now().Unix(), 0).Format(qu.Date_Short_Layout)
 	tmp := GetDownloadLast(spider.Code, date) //
 	if len(tmp) > 0 {
@@ -1317,7 +1405,7 @@ func SaveHeartInfo() {
 	time.AfterFunc(20*time.Minute, SaveHeartInfo)
 }
 
-//信息提交编辑器
+//保存7000节点爬虫转增量节点日志
 func SpiderCodeSendToEditor(code string) {
 	defer qu.Catch()
 	MgoEB.Save("luamovelog", map[string]interface{}{

+ 1 - 1
src/spider/history.go

@@ -194,7 +194,7 @@ func GetHistoryDownloadSpider() {
 						}
 					}
 					if isNew {
-						sp, errstr := NewSpider(code, script)
+						sp, errstr := CreateSpider(code, script, true, false)
 						if errstr == "" && sp != nil && sp.Code != "nil" { //脚本加载成功
 							sp.IsMainThread = true            //多线程采集时,判断哪个是主线程,由主线程采集时更新心跳
 							HistoryAllSpiders.Store(code, sp) //存入集合

+ 14 - 14
src/spider/spider.go

@@ -336,9 +336,9 @@ func (s *Spider) DownListPageItem() (errs interface{}) {
 							s.DownloadDetailItem(tmp, &repeatListNum)
 						} else {
 							tmp["comeintime"] = time.Now().Unix()
-							atomic.AddInt32(&s.LastDowncount, 1)
-							atomic.AddInt32(&s.TodayDowncount, 1)
-							atomic.AddInt32(&s.TotalDowncount, 1)
+							//atomic.AddInt32(&s.LastDowncount, 1)
+							//atomic.AddInt32(&s.TodayDowncount, 1)
+							//atomic.AddInt32(&s.TotalDowncount, 1)
 							href := fmt.Sprint(tmp["href"])
 							if len(href) > 5 { //有效数据
 								hashHref := HexText(href)
@@ -552,9 +552,9 @@ func (s *Spider) HistoricalMendDownloadDetailItem(p interface{}) {
 	delete(data, "exit")
 	delete(data, "checkpublishtime")
 	data["comeintime"] = time.Now().Unix()
-	atomic.AddInt32(&s.LastDowncount, 1)
-	atomic.AddInt32(&s.TodayDowncount, 1)
-	atomic.AddInt32(&s.TotalDowncount, 1)
+	//atomic.AddInt32(&s.LastDowncount, 1)
+	//atomic.AddInt32(&s.TodayDowncount, 1)
+	//atomic.AddInt32(&s.TotalDowncount, 1)
 	data["spidercode"] = s.Code
 	//qu.Debug("--------------开始保存---------------")
 	data["iscompete"] = s.IsCompete //2021-11-01以后新增的爬虫不在展示原文链接(保存服务判断)
@@ -652,9 +652,9 @@ func (s *Spider) DownloadDetailItem(p interface{}, num *int) {
 	delete(data, "exit")
 	delete(data, "checkpublishtime")
 	data["comeintime"] = time.Now().Unix()
-	atomic.AddInt32(&s.LastDowncount, 1)
-	atomic.AddInt32(&s.TodayDowncount, 1)
-	atomic.AddInt32(&s.TotalDowncount, 1)
+	//atomic.AddInt32(&s.LastDowncount, 1)
+	//atomic.AddInt32(&s.TodayDowncount, 1)
+	//atomic.AddInt32(&s.TotalDowncount, 1)
 	data["spidercode"] = s.Code
 	data["iscompete"] = s.IsCompete //2021-11-01以后新增的爬虫不在展示原文链接(保存服务判断)
 	Store(s.StoreMode, s.StoreToMsgEvent, s.Collection, s.CoverAttr, data, true)
@@ -690,9 +690,9 @@ func (s *Spider) DownloadDetailByNames(p interface{}) {
 		}
 	}
 	data["comeintime"] = time.Now().Unix()
-	atomic.AddInt32(&s.LastDowncount, 1)
-	atomic.AddInt32(&s.TodayDowncount, 1)
-	atomic.AddInt32(&s.TotalDowncount, 1)
+	//atomic.AddInt32(&s.LastDowncount, 1)
+	//atomic.AddInt32(&s.TodayDowncount, 1)
+	//atomic.AddInt32(&s.TotalDowncount, 1)
 	Store(s.StoreMode, s.StoreToMsgEvent, s.Collection, s.CoverAttr, data, true)
 }
 
@@ -765,7 +765,7 @@ func GetListDataDownloadDetail() {
 	Allspiders2.Range(func(k, v interface{}) bool {
 		sp := v.(*Spider)
 		go sp.DownloadHighDetail(true)
-		time.Sleep(2 * time.Second)
+		time.Sleep(1 * time.Second)
 		return true
 	})
 }
@@ -1042,7 +1042,7 @@ func (s *Spider) DownloadDetail(reload bool, isHistory bool) {
 //初始化sp对象
 func NewSpiderByScript(num int, code string, info map[string]string, spChan chan *Spider) {
 	for i := 1; i <= num; i++ {
-		spTmp, errstr := NewSpiderForThread(code, info["script"])
+		spTmp, errstr := CreateSpider(code, info["script"], true, true)
 		if errstr == "" && spTmp != nil { //脚本加载成功
 			spTmp.UserName = info["createuser"]
 			spTmp.UserEmail = info["createuseremail"]

+ 14 - 15
src/spider/store.go

@@ -12,7 +12,6 @@ import (
 	//"qfw/util/redis"
 	lu "spiderutil"
 	"strings"
-	"sync/atomic"
 	"time"
 )
 
@@ -172,20 +171,20 @@ func GetDownloadLast(code, date string) map[string]interface{} {
 func GcCount() {
 	t := time.Now()
 	if t.Hour() == 0 {
-		Allspiders.Range(func(key, value interface{}) bool {
-			v := value.(*Spider)
-			//生成爬虫数据
-			SaveDownCount(v.Code, true, v.TodayDowncount, v.ToDayRequestNum, v.YesterdayDowncount, v.YestoDayRequestNum)
-			atomic.StoreInt32(&v.YesterdayDowncount, 0)
-			atomic.AddInt32(&v.YesterdayDowncount, v.TodayDowncount)
-			atomic.StoreInt32(&v.TodayDowncount, 0)
-			atomic.StoreInt32(&v.YestoDayRequestNum, 0)
-			atomic.AddInt32(&v.YestoDayRequestNum, v.ToDayRequestNum)
-			atomic.StoreInt32(&v.ToDayRequestNum, 0)
-			atomic.StoreInt32(&v.LastDowncount, 0)
-			atomic.StoreInt32(&v.RoundCount, 0)
-			return true
-		})
+		//Allspiders.Range(func(key, value interface{}) bool {
+		//	v := value.(*Spider)
+		//	//生成爬虫数据
+		//	SaveDownCount(v.Code, true, v.TodayDowncount, v.ToDayRequestNum, v.YesterdayDowncount, v.YestoDayRequestNum)
+		//	atomic.StoreInt32(&v.YesterdayDowncount, 0)
+		//	atomic.AddInt32(&v.YesterdayDowncount, v.TodayDowncount)
+		//	atomic.StoreInt32(&v.TodayDowncount, 0)
+		//	atomic.StoreInt32(&v.YestoDayRequestNum, 0)
+		//	atomic.AddInt32(&v.YestoDayRequestNum, v.ToDayRequestNum)
+		//	atomic.StoreInt32(&v.ToDayRequestNum, 0)
+		//	atomic.StoreInt32(&v.LastDowncount, 0)
+		//	atomic.StoreInt32(&v.RoundCount, 0)
+		//	return true
+		//})
 		//删除15天前的数据
 		//mgu.Del("data_bak", "spider", "spider", `{"comeintime":{"$lt":`+fmt.Sprint(t.Add(-200*24*time.Hour).Unix())+`}}`)
 		MgoS.Del("spider_errlog", map[string]interface{}{"comeintime": map[string]interface{}{"$lt": t.Add(-30 * 24 * time.Hour).Unix()}})