标签中的正文
Elements paragraphs = document.getElementsByTag("p");
diff --git a/src/main/java/com/flyingpig/bilibilispider/constant/HeaderConstant.java b/src/main/java/com/flyingpig/bilibilispider/constant/HeaderConstant.java
index 60a172a..10debc1 100644
--- a/src/main/java/com/flyingpig/bilibilispider/constant/HeaderConstant.java
+++ b/src/main/java/com/flyingpig/bilibilispider/constant/HeaderConstant.java
@@ -6,4 +6,5 @@ package com.flyingpig.bilibilispider.constant;
public class HeaderConstant {
public static final String COOKIE = "buvid3=06742E53-942C-670A-D496-6E2A79F196FF52832infoc; b_nut=1694915352; i-wanna-go-back=-1; b_ut=7; _uuid=F744F108A-8F810-A165-2EA4-7B4956ACF910C53152infoc; buvid4=8D3A427A-5715-145B-3AA8-9ACC6E30889D54861-023091709-5h4N7ejh5A4ENQhvWFdRwQ%3D%3D; hit-new-style-dyn=1; hit-dyn-v2=1; header_theme_version=CLOSE; rpdid=0zbfAGEiSg|12slY8UuG|pS|3w1QHGXk; LIVE_BUVID=AUTO6216955654982035; buvid_fp_plain=undefined; enable_web_push=DISABLE; dy_spec_agreed=1; is-2022-channel=1; CURRENT_BLACKGAP=0; DedeUserID=398014090; DedeUserID__ckMd5=da87c9926c73fac5; FEED_LIVE_VERSION=V_WATCHLATER_PIP_WINDOW3; SESSDATA=618de7e5%2C1726673190%2C8e231%2A32CjAB8DOA4RwqxG7hQy82813je1HM5n0r08KRLyQfyA9zqBalG7QRrNNsuqvI7RejMHwSVnloTURqNE5qWmZmV0M3b0hqS0dTU21ES3NEbU9BX1JwNTNHU0VYMXc2YXNYRU9aOTJ2Q1ZXZkV4aWUyMzQ1VFo0eWpOMGVxUVQydVFfVmVGWjNoY1d3IIEC; bili_jct=51d42647c6b3da22794e018c68e239ba; CURRENT_FNVAL=4048; CURRENT_QUALITY=80; fingerprint=86d24a6d98af903f094c42f9498dfc3d; PVID=3; buvid_fp=86d24a6d98af903f094c42f9498dfc3d; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjQ4ODkxMDUsImlhdCI6MTcyNDYyOTg0NSwicGx0IjotMX0.SuRMicGtcUVVh2xh7DrFQCJReFKXavWzf07sThaixyU; bili_ticket_expires=1724889045; home_feed_column=5; browser_resolution=1440-641; sid=7oephj0f; bp_t_offset_398014090=970621780936884224; b_lsid=410A8B269_1919809748E; bsource=search_google; xxoo-tmp=zhHans";
+ public static final String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3";
}
diff --git a/src/main/java/com/flyingpig/bilibilispider/task/BilibiliSpiderTask.java b/src/main/java/com/flyingpig/bilibilispider/task/BilibiliSpiderTask.java
index 4a2d601..1835fd5 100644
--- a/src/main/java/com/flyingpig/bilibilispider/task/BilibiliSpiderTask.java
+++ b/src/main/java/com/flyingpig/bilibilispider/task/BilibiliSpiderTask.java
@@ -4,8 +4,12 @@ import com.flyingpig.bilibilispider.constant.FileName;
import com.google.gson.JsonArray;
import com.google.gson.JsonParser;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.util.UriComponentsBuilder;
-import java.io.*;
+import okhttp3.HttpUrl;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -13,8 +17,10 @@ import java.util.concurrent.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.Inflater;
+
import static com.flyingpig.bilibilispider.constant.UrlConstant.*;
-import static com.flyingpig.bilibilispider.util.RequestUtil.*;
+import static com.flyingpig.bilibilispider.util.RequestUtil.requestToGetBodyBytes;
+import static com.flyingpig.bilibilispider.util.RequestUtil.requesttToGetBodyString;
@Slf4j
public class BilibiliSpiderTask {
@@ -31,11 +37,13 @@ public class BilibiliSpiderTask {
final int page = j;
Future> future = executor.submit(() -> {
List