Skip to content

Commit c496162

Browse files
committed
dili解析修改
1 parent e274be3 commit c496162

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/java/com/suda/MyVideoApi/service/BaseVideoService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ public List<VideoDTO> queryVideosByType(String tag, int pageIndex, boolean useCa
7373
videoDO.setTitle(parseName(article));
7474
videoDO.setOriginUrl(parseOriginUrl(article));
7575
videoDO.setThumb(parseThumb(article));
76+
if (StringUtils.isEmpty(videoDO.getThumb())){
77+
continue;
78+
}
7679
videoDOS.add(videoDO);
7780

7881
String key2 = "VideoTitle:" + videoDO.getTitle() + "(源" + getApi().sourceId + ")";
@@ -196,6 +199,8 @@ protected String parseThumb(Element item) {
196199
String thumb = thumbEl.attr("data-original");
197200
if (thumb.indexOf("http") >= 0) {
198201
return thumb;
202+
} else if (StringUtils.isEmpty(thumb)){
203+
return "";
199204
} else {
200205
return "https:" + thumb;
201206
}

0 commit comments

Comments
 (0)