From c9c4f889e4b2917ff2ab5e5d5684982fa3952e44 Mon Sep 17 00:00:00 2001 From: tamguo Date: Sun, 12 Aug 2018 18:44:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=88=AC=E5=8F=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/tamguo/service/impl/QuestionService.java | 4 ++-- .../main/java/com/tamguo/service/impl/SubjectService.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tamguo-crawler/src/main/java/com/tamguo/service/impl/QuestionService.java b/tamguo-crawler/src/main/java/com/tamguo/service/impl/QuestionService.java index 757fa7f..e4d2024 100644 --- a/tamguo-crawler/src/main/java/com/tamguo/service/impl/QuestionService.java +++ b/tamguo-crawler/src/main/java/com/tamguo/service/impl/QuestionService.java @@ -52,8 +52,8 @@ public class QuestionService implements IQuestionService{ @Autowired CacheService cacheService; private static final String FILES_NO_FORMAT = "000000000"; - private static final String FILES_PREFIX = "shengwu"; - private static final String COURSE_ID = "shengwu"; + private static final String FILES_PREFIX = "zz"; + private static final String COURSE_ID = "zhengzhi"; private static final String DOMAIN = "http://www.tamguo.com"; private RunData runData; diff --git a/tamguo-crawler/src/main/java/com/tamguo/service/impl/SubjectService.java b/tamguo-crawler/src/main/java/com/tamguo/service/impl/SubjectService.java index 561925c..0a39ffb 100644 --- a/tamguo-crawler/src/main/java/com/tamguo/service/impl/SubjectService.java +++ b/tamguo-crawler/src/main/java/com/tamguo/service/impl/SubjectService.java @@ -30,8 +30,8 @@ import com.xuxueli.crawler.rundata.RunData; @Service public class SubjectService implements ISubjectService{ - private final static String COURSE_ID = "shengwu"; - private final static String BOOK_ID = "1025976567395184645"; + private final static String COURSE_ID = "zhengzhi"; + private final static String BOOK_ID = "1025976567395184649"; private final static String SUBJECT_ID = "gaokao"; @Autowired SubjectMapper subjectMapper; @@ -53,7 +53,7 @@ public class SubjectService implements ISubjectService{ @Override public void crawlerSubject() { XxlCrawler crawler = new XxlCrawler.Builder() - .setUrls("https://tiku.baidu.com/tikupc/chapterlist/1bfd700abb68a98271fefa04-20-knowpoint-11") + .setUrls("https://tiku.baidu.com/tikupc/chapterlist/1bfd700abb68a98271fefa04-26-knowpoint-11") .setAllowSpread(false) .setFailRetryCount(5) .setThreadCount(20) @@ -63,7 +63,7 @@ public class SubjectService implements ISubjectService{ public void parse(Document html, Element pageVoElement, SubjectVo subjectVo) { // 解析封装 PageVo 对象 String pageUrl = html.baseUri(); - if(pageUrl.contains("https://tiku.baidu.com/tikupc/chapterlist/1bfd700abb68a98271fefa04-20-knowpoint-11")) { + if(pageUrl.contains("https://tiku.baidu.com/tikupc/chapterlist/1bfd700abb68a98271fefa04-26-knowpoint-11")) { logger.info("开始解析书籍:{}" , pageUrl); ChapterEntity chapterCondition = new ChapterEntity(); chapterCondition.setName(subjectVo.getChapterCurrName());