This commit is contained in:
FongMi 2025-01-23 21:22:39 +08:00
parent 55ad1d5dc6
commit ac3b7c8b00
3 changed files with 8 additions and 1 deletions

View File

@ -33,6 +33,7 @@ import java.util.Objects;
public class Living extends Spider {
private String host = "https://lemonlive.deno.dev";
private String cookie;
@Override
public void init(Context context, String extend) throws Exception {
@ -135,7 +136,13 @@ public class Living extends Spider {
} else {
String[] split = tid.split("_");
String url = host + "/api/" + split[0] + "/getCategoryRooms?id=" + split[1] + "&pid=" + (split[0].equals("bilibili") ? "2" : "1") + "&page=" + pg;
if (!TextUtils.isEmpty(cookie)) {
url = url + "&cookie=" + URLDecoder.decode(cookie, "UTF-8");
}
JSONObject json = request(url);
if (!TextUtils.isEmpty(json.optJSONObject("data").optString("cookie"))) {
cookie = json.optJSONObject("data").optString("cookie");
}
List<Vod> vodList = new ArrayList<>();
for (int i = 0; i < json.optJSONObject("data").optJSONArray("list").length(); i++) {
JSONObject data = json.optJSONObject("data").optJSONArray("list").optJSONObject(i);

Binary file not shown.

View File

@ -1 +1 @@
1988877e7ba7cbd557417f95d5ca8f61
d3032c67b4ae4bd21fa7c070544a111a