Ver código fonte

验证功能详情页支持加载图片

mxs 7 meses atrás
pai
commit
b82aaacf4d
2 arquivos alterados com 3 adições e 2 exclusões
  1. 2 2
      backend/vm/check.go
  2. 1 0
      backend/vm/vm.go

+ 2 - 2
backend/vm/check.go

@@ -16,8 +16,8 @@ func (vm *VM) VerifySpiderConfig(sc *be.SpiderConfig) (*be.SpiderConfigVerifyRes
 	verifyResult := list.New()
 	be.DataResults[sc.Code] = verifyResult
 	ret := &be.SpiderConfigVerifyResult{false, false, false, false, false, false, false}
-	_, baseCancelFn, _, _, ctx, incCancelFn := be.NewBrowser(false, false, false)    //列表页使用
-	_, baseCancelFn2, _, _, ctx2, incCancelFn2 := be.NewBrowser(false, false, false) //详情页使用
+	_, baseCancelFn, _, _, ctx, incCancelFn := be.NewBrowser(false, false, false)   //列表页使用
+	_, baseCancelFn2, _, _, ctx2, incCancelFn2 := be.NewBrowser(false, true, false) //详情页使用
 	defer func() {
 		incCancelFn2()
 		baseCancelFn2()

+ 1 - 0
backend/vm/vm.go

@@ -98,6 +98,7 @@ func downloadAttaches(v *be.ResultItem, attachesDir string) {
 		mtype := mimetype.Detect(bs)
 		//不要HTML网页
 		if strings.Contains(strings.ToLower(mtype.String()), "html") {
+			qu.Debug("附件为网页类型,过滤")
 			continue
 		}
 		fileName := fmt.Sprintf("%s_%04d_%04d_%04d%s", time.Now().Format("20060102150405"), rand.Intn(9999),