mxs 9 bulan lalu
induk
melakukan
fafdb15a51

+ 3 - 3
backend/vm/check.go

@@ -158,7 +158,6 @@ func (vm *VM) VerifySpiderConfig(sc *be.SpiderConfig) (*be.SpiderConfigVerifyRes
 		contentRunJs = renderJavascriptCoder(loadContentJS, sc)
 	}
 	qu.Debug("列表页JS:", listRunJs)
-	qu.Debug("详情页JS:", contentRunJs)
 	//TODO 3.打开列表,获取条目清单
 	chromedp.Run(ctx, chromedp.Tasks{
 		chromedp.Navigate(sc.Href),
@@ -208,6 +207,7 @@ T:
 				break
 			} else if sc.MaxPages > 1 { // && !ret.ListTrunPage {
 				if err = trunPage(sc, sc.ListTurnDelayTime, ctx); err != nil { //翻页失败
+					qu.Debug("翻页失败:", err)
 					break T
 				} else {
 					ret.ListTrunPage = true
@@ -218,10 +218,10 @@ T:
 	//检查
 	for el := verifyResult.Front(); el != nil; el = el.Next() {
 		r, _ := el.Value.(*be.ResultItem)
-		qu.Debug("Check Title:", ret.Title, r.Title, r.ListTitle)
 		ret.Title = r.Title != ""
-		qu.Debug("Check PublishTime:", ret.PublishTime, r.PublishTime, r.ListPubTime)
+		qu.Debug("Check Title:", ret.Title, r.Title, r.ListTitle)
 		ret.PublishTime = r.PublishTime != ""
+		qu.Debug("Check PublishTime:", ret.PublishTime, r.PublishTime, r.ListPubTime)
 	}
 	if ret.ListItems {
 		ret.ListItems = (sc.MaxPages == 1 && verifyResult.Len() > 0) || (sc.MaxPages > 1 && verifyResult.Len() > 2)

+ 1 - 1
frontend/src/components/spider/jscodetpl.js

@@ -54,7 +54,7 @@ if("{{.AttachCss}}"!=""){//附件
 	let attach=[]
 	if(tmp){
 		tmp.forEach((v,i)=>{
-			attach.push([v.getAttribute("title")||v.innerText,v.href])
+			attach.push({title:v.getAttribute("title")||v.innerText,href:v.href})
 		})
 	}
 	ret["attachLinks"]=attach

+ 1 - 1
tpl/load_content.js

@@ -26,7 +26,7 @@ if("{{.AttachCss}}"!=""){//附件
 	let attach=[]
 	if(tmp){
 		tmp.forEach((v,i)=>{
-			attach.push([v.getAttribute("title")||v.innerText,v.href])
+			attach.push({title:v.getAttribute("title")||v.innerText,href:v.href})
 		})
 	}
 	ret["attachLinks"]=attach