From 02f47ce1acea7f564f8684db4da7ff3e6cfe1cc6 Mon Sep 17 00:00:00 2001 From: tamguo Date: Sun, 14 Oct 2018 19:04:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8B=E6=83=85=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/tamguo/service/impl/QuestionService.java | 4 ++-- .../java/com/tamguo/service/impl/SubjectService.java | 10 +++++----- .../src/test/java/com/tamguo/PaperCrawler.java | 6 +++--- .../src/main/resources/templates/include/footer.html | 7 ------- 4 files changed, 10 insertions(+), 17 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 4cb78d1..93b97f6 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 @@ -53,8 +53,8 @@ public class QuestionService extends ServiceImpl @Autowired CacheService cacheService; private static final String FILES_NO_FORMAT = "000000000"; - private static final String FILES_PREFIX = "kyzz"; - private static final String COURSE_ID = "kaoyanzhengzhi"; + private static final String FILES_PREFIX = "qyglzs"; + private static final String COURSE_ID = "qiyeguanlizhishi"; 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 6d21fb0..2c4bdfa 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,9 +30,9 @@ import com.xuxueli.crawler.rundata.RunData; @Service public class SubjectService implements ISubjectService{ - private final static String COURSE_ID = "kaoyanzhengzhi"; - private final static String BOOK_ID = "1025976567395184651"; - private final static String SUBJECT_ID = "kaoyan"; + private final static String COURSE_ID = "qiyeguanlizhishi"; + private final static String BOOK_ID = "1025976567395184652"; + private final static String SUBJECT_ID = "qiyefalvguwen"; @Autowired SubjectMapper subjectMapper; @Autowired @@ -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/f3eb19e8b8f67c1cfad6b805-342-knowpoint-11") + .setUrls("https://tiku.baidu.com/tikupc/chapterlist/ed6527d3240c844769eaee05-647-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/f3eb19e8b8f67c1cfad6b805-342-knowpoint-11")) { + if(pageUrl.contains("https://tiku.baidu.com/tikupc/chapterlist/ed6527d3240c844769eaee05-647-knowpoint-11")) { logger.info("开始解析书籍:{}" , pageUrl); ChapterEntity chapterCondition = new ChapterEntity(); chapterCondition.setName(subjectVo.getChapterCurrName()); diff --git a/tamguo-crawler/src/test/java/com/tamguo/PaperCrawler.java b/tamguo-crawler/src/test/java/com/tamguo/PaperCrawler.java index e452348..9e46ab7 100644 --- a/tamguo-crawler/src/test/java/com/tamguo/PaperCrawler.java +++ b/tamguo-crawler/src/test/java/com/tamguo/PaperCrawler.java @@ -34,13 +34,13 @@ public class PaperCrawler { // 140000 山西 | 350000 福建 | 340000 安徽 | 220000 吉林 | 150000 内蒙古 | 640000 宁夏 | 650000 新疆 | 广西 450000 | 210000 辽宁 // 230000 黑龙江 | 610000 陕西 | 360000 江西 | 440000 广东 | 430000 湖南 | 460000 海南 | 530000 云南 | 510000 四川 | 630000 青海 // 620000 甘肃 | 130000 河北 | 540000 西藏 | 贵州 520000 - private final String AREA_ID = "150000"; + private final String AREA_ID = "440000"; // 年份 private final String YEAR = "2016"; // 真题试卷 类型(1:真题试卷,2:模拟试卷,3:押题预测,4:名校精品) - private final String PAPER_TYPE = "2"; + private final String PAPER_TYPE = "4"; // 开始采集的URL - private final String START_URL = "https://tiku.baidu.com/tikupc/paperlist/1bfd700abb68a98271fefa04-18-4-2016-965-1-download"; + private final String START_URL = "https://tiku.baidu.com/tikupc/paperlist/1bfd700abb68a98271fefa04-18-7-2016-1427-1-download"; private RunData runData; diff --git a/tamguo-tms/src/main/resources/templates/include/footer.html b/tamguo-tms/src/main/resources/templates/include/footer.html index f6f13b2..a7d0322 100644 --- a/tamguo-tms/src/main/resources/templates/include/footer.html +++ b/tamguo-tms/src/main/resources/templates/include/footer.html @@ -40,13 +40,6 @@
  • DMOZ目录
  • -
  • 重庆高考 -
  • -
  • 江西自考网 -
  • -