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