|
|
|
@ -2,7 +2,6 @@ package Tools.crawler;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.dsideal.QingLong.Start;
|
|
|
|
|
import com.jfinal.kit.PropKit;
|
|
|
|
|
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
|
|
|
|
|
import com.jfinal.plugin.activerecord.CaseInsensitiveContainerFactory;
|
|
|
|
@ -10,12 +9,11 @@ import com.jfinal.plugin.activerecord.Db;
|
|
|
|
|
import com.jfinal.plugin.activerecord.dialect.PostgreSqlDialect;
|
|
|
|
|
import com.jfinal.plugin.hikaricp.HikariCpPlugin;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
public class yx {
|
|
|
|
|
public class YunXiao {
|
|
|
|
|
|
|
|
|
|
public static JSONArray tempTree = new JSONArray();
|
|
|
|
|
|
|
|
|
@ -77,7 +75,7 @@ public class yx {
|
|
|
|
|
map.forEach((key, value) -> {
|
|
|
|
|
String sql = "";
|
|
|
|
|
|
|
|
|
|
String respSubject = util.doGet("https://yx.ccsjy.cn/api/business/v1/subject/list/" + key);
|
|
|
|
|
String respSubject = Util.doGet("https://yx.ccsjy.cn/api/business/v1/subject/list/" + key);
|
|
|
|
|
JSONObject jsonObj = JSONObject.parseObject(respSubject);
|
|
|
|
|
JSONArray jsonArr = jsonObj.getJSONObject("data").getJSONArray("rows");
|
|
|
|
|
for (int i = 0; i < jsonArr.size(); i++) {
|
|
|
|
@ -93,7 +91,7 @@ public class yx {
|
|
|
|
|
argScheme.put("subjectCode", subjectCode);
|
|
|
|
|
argScheme.put("systemId", 1);
|
|
|
|
|
|
|
|
|
|
String respScheme = util.doPost("https://yx.ccsjy.cn/api/business/v1/edition/list", argScheme.toString());
|
|
|
|
|
String respScheme = Util.doPost("https://yx.ccsjy.cn/api/business/v1/edition/list", argScheme.toString());
|
|
|
|
|
JSONObject jsonObjScheme = JSONObject.parseObject(respScheme);
|
|
|
|
|
JSONArray jsonArrScheme = jsonObjScheme.getJSONArray("data");
|
|
|
|
|
|
|
|
|
@ -110,7 +108,7 @@ public class yx {
|
|
|
|
|
argBook.put("subjectCode", subjectCode);
|
|
|
|
|
argBook.put("businessEditionId", businessEditionId);
|
|
|
|
|
|
|
|
|
|
String respBook = util.doPost("https://yx.ccsjy.cn/api/business/v1/book/list", argBook.toString());
|
|
|
|
|
String respBook = Util.doPost("https://yx.ccsjy.cn/api/business/v1/book/list", argBook.toString());
|
|
|
|
|
JSONObject jsonObjBook = JSONObject.parseObject(respBook);
|
|
|
|
|
JSONArray jsonArrBook = jsonObjBook.getJSONArray("data");
|
|
|
|
|
|
|
|
|
@ -137,7 +135,7 @@ public class yx {
|
|
|
|
|
argTree.put("parentId", -1);
|
|
|
|
|
argTree.put("searchKeyword", "");
|
|
|
|
|
|
|
|
|
|
String respTree = util.doPost("https://yx.ccsjy.cn/api/business/v1/chapter/tree", argTree.toString());
|
|
|
|
|
String respTree = Util.doPost("https://yx.ccsjy.cn/api/business/v1/chapter/tree", argTree.toString());
|
|
|
|
|
JSONObject jsonObjTree = JSONObject.parseObject(respTree);
|
|
|
|
|
JSONArray jsonArrTree = jsonObjTree.getJSONObject("data").getJSONArray("tree");
|
|
|
|
|
|
|
|
|
@ -176,7 +174,7 @@ public class yx {
|
|
|
|
|
argSource.put("source", "");
|
|
|
|
|
argSource.put("searchKeyword", "");
|
|
|
|
|
|
|
|
|
|
String respSource = util.doPost("https://yx.ccsjy.cn/api/cloud-school/v1/cloudLesson/getOnDemandLessonPage", argSource.toString());
|
|
|
|
|
String respSource = Util.doPost("https://yx.ccsjy.cn/api/cloud-school/v1/cloudLesson/getOnDemandLessonPage", argSource.toString());
|
|
|
|
|
JSONObject jsonObjSource = JSONObject.parseObject(respSource);
|
|
|
|
|
JSONArray jsonArrSource = jsonObjSource.getJSONObject("data").getJSONArray("rows");
|
|
|
|
|
|