diff --git a/pom.xml b/pom.xml index 65fe4b9..53c66ee 100644 --- a/pom.xml +++ b/pom.xml @@ -14,6 +14,17 @@ lombok 1.18.12 + + + org.jsoup + jsoup + 1.10.2 + + + cn.hutool + hutool-all + 5.7.17 + diff --git a/src/main/java/Main.java b/src/main/java/Main.java new file mode 100644 index 0000000..304cbf6 --- /dev/null +++ b/src/main/java/Main.java @@ -0,0 +1,20 @@ +import cn.hutool.core.io.file.FileWriter; +import cn.hutool.http.HttpRequest; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; + +import java.io.IOException; + +public class Main { + public static void main(String[] args) throws IOException { + String result = HttpRequest.post("https://ke.gupaoedu.cn/api/v2/curriculum/outline?curriculumId=288") + .timeout(20000) + .execute().body(); + JSONObject jsonObject = JSONUtil.parseObj(result); + JSONObject chapterList = jsonObject.getJSONObject("data"); + FileWriter writer = new FileWriter("test.txt"); + writer.write("test"); + + System.out.println("--------"); + } +}