|
@@ -123,7 +123,7 @@ T:
|
|
|
r, _ := el.Value.(*be.ResultItem)
|
|
|
ret.Title = r.Title != ""
|
|
|
ret.PublishUnit = r.PublishUnit != ""
|
|
|
- ret.PublishTime = r.PublishTime != ""
|
|
|
+ ret.PublishTime = r.PublishTime != "" && Reg_Date.MatchString(r.PublishTime)
|
|
|
ret.Content = r.Content != ""
|
|
|
ret.Attaches = len(r.AttachLinks) > 0
|
|
|
}
|
|
@@ -166,8 +166,9 @@ T:
|
|
|
// return ret, errors.New("初始化列表页失败")
|
|
|
// }
|
|
|
// no := 1
|
|
|
+// ret.ListTrunPage = true
|
|
|
//T:
|
|
|
-// for j := 0; j < 2; j++ { //最多检查2页
|
|
|
+// for j := 0; j < VERIVY_MAX_TRUN_PAGE && j < int(sc.MaxPages); j++ { //最多检查2页
|
|
|
// qu.Debug("开始检查第" + fmt.Sprint(j+1) + "页...")
|
|
|
// listResult := make(be.ResultItems, 0)
|
|
|
// err := chromedp.Run(ctx, chromedp.Tasks{
|
|
@@ -202,17 +203,16 @@ T:
|
|
|
// qu.Debug("列表采集条数结果:", verifyResult.Len())
|
|
|
// //6.翻页
|
|
|
// if verifyResult.Len() > 0 {
|
|
|
-// if sc.MaxPages == 1 { //最大页为1,不校验翻页
|
|
|
-// ret.ListTrunPage = true
|
|
|
-// break
|
|
|
-// } else if sc.MaxPages > 1 { // && !ret.ListTrunPage {
|
|
|
+// if sc.MaxPages > 1 && j < VERIVY_MAX_TRUN_PAGE-1 && j < int(sc.MaxPages)-1 { //&& !ret.ListTrunPage {
|
|
|
// if err = trunPage(sc, sc.ListTurnDelayTime, ctx); err != nil { //翻页失败
|
|
|
-// qu.Debug("翻页失败:", err)
|
|
|
+// qu.Debug("第" + fmt.Sprint(j+1) + "页翻页失败")
|
|
|
+// ret.ListTrunPage = false
|
|
|
// break T
|
|
|
-// } else {
|
|
|
-// ret.ListTrunPage = true
|
|
|
// }
|
|
|
// }
|
|
|
+// } else {
|
|
|
+// ret.ListTrunPage = false
|
|
|
+// break T
|
|
|
// }
|
|
|
// }
|
|
|
// //检查
|
|
@@ -220,7 +220,8 @@ T:
|
|
|
// r, _ := el.Value.(*be.ResultItem)
|
|
|
// ret.Title = r.Title != ""
|
|
|
// qu.Debug("Check Title:", ret.Title, r.Title, r.ListTitle)
|
|
|
-// ret.PublishTime = r.PublishTime != ""
|
|
|
+//
|
|
|
+// ret.PublishTime = r.PublishTime != "" && Reg_Date.MatchString(r.PublishTime)
|
|
|
// qu.Debug("Check PublishTime:", ret.PublishTime, r.PublishTime, r.ListPubTime)
|
|
|
// }
|
|
|
// if ret.ListItems {
|