爬虫代码优化

This commit is contained in:
xiongxiaoyang committed 2020-12-24 01:30:00 +08:00
1 parent 6fd183c2ae
commit f61c252e71
1 file changed
+1
@@ -58,6 +58,7 @@ public class StarterListener implements ServletContextListener {
Book book = CrawlParser.parseBook(ruleBean, needUpdateBook.getCrawlBookId());
//这里只做老书更新
book.setId(needUpdateBook.getId());
book.setWordCount(needUpdateBook.getWordCount());
if (needUpdateBook.getPicUrl() != null && needUpdateBook.getPicUrl().contains(Constants.LOCAL_PIC_PREFIX)) {
//本地图片则不更新
book.setPicUrl(null);