rdluck 4 年之前
父節點
當前提交
f36a574e14
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      services/article.go

+ 2 - 2
services/article.go

@@ -49,7 +49,7 @@ func GetReportContentTextSub(content string) (contentSub string, err error) {
 				return
 				return
 			}
 			}
 			text := s.Text()
 			text := s.Text()
-			if !strings.Contains(text, "访谈时间") && !strings.Contains(text, "纪要详情") {
+			if text != "" && !strings.Contains(text, "访谈时间") && !strings.Contains(text, "纪要详情") {
 				n++
 				n++
 				contentSub = contentSub + s.Text()
 				contentSub = contentSub + s.Text()
 			}
 			}
@@ -64,7 +64,7 @@ func GetReportContentTextSub(content string) (contentSub string, err error) {
 					return
 					return
 				}
 				}
 				text := s.Text()
 				text := s.Text()
-				if !strings.Contains(text, "访谈时间") && !strings.Contains(text, "纪要详情") {
+				if text != "" && !strings.Contains(text, "访谈时间") && !strings.Contains(text, "纪要详情") {
 					n++
 					n++
 					contentSub = contentSub + s.Text()
 					contentSub = contentSub + s.Text()
 				}
 				}