|
@@ -920,6 +920,8 @@ func CreateSpider(code, luafile string, newstate, thread bool) (*Spider, string)
|
|
|
spider.IsMustDownload = spider.GetBoolVar("spiderIsMustDownload")
|
|
|
//新老爬虫
|
|
|
spider.IsCompete = spider.GetBoolVar("spiderIsCompete")
|
|
|
+ //爬虫类型
|
|
|
+ spider.Infoformat = spider.GetIntVar("spiderInfoformat")
|
|
|
return spider, ""
|
|
|
}
|
|
|
|
|
@@ -971,6 +973,8 @@ func UpdateSpider(spider *Spider, code, script string) {
|
|
|
spider.IsMustDownload = ts.GetBoolVar("spiderIsMustDownload")
|
|
|
//新老爬虫
|
|
|
spider.IsCompete = ts.GetBoolVar("spiderIsCompete")
|
|
|
+ //爬虫类型
|
|
|
+ spider.Infoformat = spider.GetIntVar("spiderInfoformat")
|
|
|
}
|
|
|
|
|
|
//排队模式生成爬虫
|
|
@@ -1031,6 +1035,8 @@ func NewSpider_New(code, luafile string, newstate bool) (*Spider, string) {
|
|
|
spider.IsMustDownload = spider.GetBoolVar("spiderIsMustDownload")
|
|
|
//新老爬虫
|
|
|
spider.IsCompete = spider.GetBoolVar("spiderIsCompete")
|
|
|
+ //爬虫类型
|
|
|
+ spider.Infoformat = spider.GetIntVar("spiderInfoformat")
|
|
|
return spider, ""
|
|
|
}
|
|
|
|
|
@@ -1093,6 +1099,8 @@ func NewSpider(code, luafile string) (*Spider, string) {
|
|
|
spider.IsMustDownload = spider.GetBoolVar("spiderIsMustDownload")
|
|
|
//新老爬虫
|
|
|
spider.IsCompete = spider.GetBoolVar("spiderIsCompete")
|
|
|
+ //爬虫类型
|
|
|
+ spider.Infoformat = spider.GetIntVar("spiderInfoformat")
|
|
|
return spider, ""
|
|
|
}
|
|
|
|
|
@@ -1147,6 +1155,8 @@ func NewSpiderForThread(code, luafile string) (*Spider, string) {
|
|
|
spider.IsMustDownload = spider.GetBoolVar("spiderIsMustDownload")
|
|
|
//新老爬虫
|
|
|
spider.IsCompete = spider.GetBoolVar("spiderIsCompete")
|
|
|
+ //爬虫类型
|
|
|
+ spider.Infoformat = spider.GetIntVar("spiderInfoformat")
|
|
|
return spider, ""
|
|
|
}
|
|
|
|
|
@@ -1264,7 +1274,7 @@ func GetScriptByTmp(luaconfig map[string]interface{}) string {
|
|
|
} else { //专家模式
|
|
|
script_content = luaconfig["str_content"].(string)
|
|
|
}
|
|
|
- script += fmt.Sprintf(util.Tmp_Other, luaconfig["spidertype"], luaconfig["spiderhistorymaxpage"], luaconfig["spidermovevent"], luaconfig["spidercompete"])
|
|
|
+ script += fmt.Sprintf(util.Tmp_Other, luaconfig["spidertype"], luaconfig["spiderhistorymaxpage"], luaconfig["spidermovevent"], luaconfig["spidercompete"], luaconfig["infoformat"])
|
|
|
script += `
|
|
|
` + script_time + `
|
|
|
` + script_list + `
|