Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
8c665b42c0
|
|
@ -28,6 +28,8 @@ public class Result {
|
|||
private String format;
|
||||
@SerializedName("danmaku")
|
||||
private String danmaku;
|
||||
@SerializedName("msg")
|
||||
private String msg;
|
||||
@SerializedName("url")
|
||||
private Object url;
|
||||
@SerializedName("subs")
|
||||
|
|
@ -85,6 +87,10 @@ public class Result {
|
|||
return Result.get().vod(item).string();
|
||||
}
|
||||
|
||||
public static String error(String msg) {
|
||||
return Result.get().vod(Collections.emptyList()).msg(msg).string();
|
||||
}
|
||||
|
||||
public static Result get() {
|
||||
return new Result();
|
||||
}
|
||||
|
|
@ -159,6 +165,11 @@ public class Result {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Result msg(String msg) {
|
||||
this.msg = msg;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result format(String format) {
|
||||
this.format = format;
|
||||
return this;
|
||||
|
|
|
|||
|
|
@ -84,13 +84,14 @@ public class Kanqiu extends Spider {
|
|||
|
||||
@Override
|
||||
public String detailContent(List<String> ids) throws Exception {
|
||||
Document doc = Jsoup.parse(OkHttp.string(ids.get(0) + "-url", getHeader()));
|
||||
JSONArray jsonArray = new JSONArray(doc.text());
|
||||
if (ids.get(0).equals(siteUrl)) return Result.error("比賽尚未開始");
|
||||
String content = OkHttp.string(ids.get(0) + "-url", getHeader());
|
||||
JSONArray linksArray = new JSONObject(content).getJSONArray("links");
|
||||
List<String> vodItems = new ArrayList<>();
|
||||
for (int i = 0; i < jsonArray.length(); i++) {
|
||||
JSONObject dataObject = jsonArray.getJSONObject(i);
|
||||
String text = dataObject.optString("name");
|
||||
String href = dataObject.optString("url");
|
||||
for (int i = 0; i < linksArray.length(); i++) {
|
||||
JSONObject linkObject = linksArray.getJSONObject(i);
|
||||
String text = linkObject.optString("name");
|
||||
String href = linkObject.optString("url");
|
||||
vodItems.add(text + "$" + href);
|
||||
}
|
||||
String vod_play_from = "Qile";
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class Zhaozy extends Ali {
|
|||
|
||||
private final Pattern regexAli = Pattern.compile("(https://www.aliyundrive.com/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 password;
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
d793cc92ea62550b731392d15bacb859
|
||||
55c157414346e3ff571baad0a223bf15
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;d793cc92ea62550b731392d15bacb859",
|
||||
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;55c157414346e3ff571baad0a223bf15",
|
||||
"wallpaper": "https://gao.chuqiuyu.workers.dev",
|
||||
"sites": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;d793cc92ea62550b731392d15bacb859",
|
||||
"spider": "https://fm.t4tv.hz.cz/jar/custom_spider.jar;md5;55c157414346e3ff571baad0a223bf15",
|
||||
"wallpaper": "http://饭太硬.top/深色壁纸/api.php",
|
||||
"sites": [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue