From bd067ef2b73135f6652de9f5cc6f770a008576f6 Mon Sep 17 00:00:00 2001 From: lijia Date: Wed, 16 Oct 2024 20:09:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#225,=E8=AE=BF=E9=97=AE=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E6=97=B6=E5=B8=A6=E4=B8=8Acookie=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E9=A3=8E=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bilibili/parsers/impl/URL4ChannelCollectionParserEx.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nicelee/bilibili/parsers/impl/URL4ChannelCollectionParserEx.java b/src/nicelee/bilibili/parsers/impl/URL4ChannelCollectionParserEx.java index 5ca1e01e..27146a55 100644 --- a/src/nicelee/bilibili/parsers/impl/URL4ChannelCollectionParserEx.java +++ b/src/nicelee/bilibili/parsers/impl/URL4ChannelCollectionParserEx.java @@ -13,6 +13,7 @@ import nicelee.bilibili.enums.VideoQualityEnum; import nicelee.bilibili.model.ClipInfo; import nicelee.bilibili.model.VideoInfo; +import nicelee.bilibili.util.HttpCookies; import nicelee.bilibili.util.HttpHeaders; import nicelee.bilibili.util.Logger; @@ -87,7 +88,7 @@ protected boolean query(int page, int min, int max, Object... obj) { // 在第一部BV里面补全up的信息,并得到所有合集 String urlBV = "https://www.bilibili.com/video/" + firstBV; - String html = util.getContent(urlBV, new HttpHeaders().getCommonHeaders("www.bilibili.com")); + String html = util.getContent(urlBV, new HttpHeaders().getCommonHeaders("www.bilibili.com"), HttpCookies.globalCookiesWithFingerprint()); int begin = html.indexOf("window.__INITIAL_STATE__="); int end = html.indexOf(";(function()", begin); String result = html.substring(begin + 25, end);