修复看球、找资源

This commit is contained in:
qlql765 2023-12-20 15:23:07 +08:00 committed by GitHub
parent d8d0fcfa59
commit 0e7993c9c0
2 changed files with 11 additions and 7 deletions

View File

@ -84,13 +84,17 @@ public class Kanqiu extends Spider {
@Override @Override
public String detailContent(List<String> ids) throws Exception { public String detailContent(List<String> ids) throws Exception {
Document doc = Jsoup.parse(OkHttp.string(ids.get(0) + "-url", getHeader())); if (ids.get(0).equals(siteUrl)) {
JSONArray jsonArray = new JSONArray(doc.text()); Notify.show("比赛尚未开始");
return Result.string(new Vod());
}
String content = OkHttp.string(ids.get(0) + "-url", getHeader());
JSONArray linksArray = new JSONObject(content).getJSONArray("links");
List<String> vodItems = new ArrayList<>(); List<String> vodItems = new ArrayList<>();
for (int i = 0; i < jsonArray.length(); i++) { for (int i = 0; i < linksArray.length(); i++) {
JSONObject dataObject = jsonArray.getJSONObject(i); JSONObject linkObject = linksArray.getJSONObject(i);
String text = dataObject.optString("name"); String text = linkObject.optString("name");
String href = dataObject.optString("url"); String href = linkObject.optString("url");
vodItems.add(text + "$" + href); vodItems.add(text + "$" + href);
} }
String vod_play_from = "Qile"; String vod_play_from = "Qile";

View File

@ -24,7 +24,7 @@ public class Zhaozy extends Ali {
private final Pattern regexAli = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)"); private final Pattern regexAli = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
private final Pattern regexVid = Pattern.compile("(\\S+)"); private final Pattern regexVid = Pattern.compile("(\\S+)");
private final String siteUrl = "https://zhaoziyuan.me/"; private final String siteUrl = "https://zhaoziyuan.pw/";
private String username; private String username;
private String password; private String password;