修复直播状态
This commit is contained in:
parent
e68bef1f5d
commit
7d8ed357cb
@ -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");
|
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){
|
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) {
|
public static boolean getLiveState(int roomId) {
|
||||||
@ -435,6 +436,8 @@ public class LiveUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
LiveUtils.reloadLiveState(22047448);
|
||||||
|
System.out.println(LiveUtils.getLiveState(22047448));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user