From 7d8ed357cbb3fe7d3e6b12ea1e2a24f5cd26c31c Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Mon, 11 Apr 2022 19:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java b/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java index dd3c28b..73b33de 100644 --- a/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java +++ b/src/main/java/com/yutou/bilibili/BiliBili/LiveUtils.java @@ -352,7 +352,8 @@ public class LiveUtils { return http_get("https://api.live.bilibili.com/xlive/web-room/v1/index/getInfoByRoom?room_id=" + roomId + "&protocol=0,1&format=0,1,2&codec=0,1&qn=10000&platform=web&ptype=8"); } public static JSONObject getLiveRoomInfo(int roomId){ - return http_get("https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo?room_id"+ roomId + "&protocol=0,1&format=0,1,2&codec=0,1&qn=10000&platform=web&ptype=8"); + String url="https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo?room_id="+ roomId + "&protocol=0,1&format=0,1,2&codec=0,1&qn=10000&platform=web&ptype=8"; + return http_get(url); } public static boolean getLiveState(int roomId) { @@ -435,6 +436,8 @@ public class LiveUtils { } public static void main(String[] args) { + LiveUtils.reloadLiveState(22047448); + System.out.println(LiveUtils.getLiveState(22047448)); } }