临时存储
This commit is contained in:
parent
7fc12cc7a6
commit
043a6b4668
11
pom.xml
11
pom.xml
@ -14,6 +14,17 @@
|
|||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.18.12</version>
|
<version>1.18.12</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<!-- jsoup HTML parser library @ http://jsoup.org/ -->
|
||||||
|
<groupId>org.jsoup</groupId>
|
||||||
|
<artifactId>jsoup</artifactId>
|
||||||
|
<version>1.10.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.7.17</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
20
src/main/java/Main.java
Normal file
20
src/main/java/Main.java
Normal file
@ -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("--------");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user