diff --git a/app/src/main/java/com/github/catvod/spider/Introduce.java b/app/src/main/java/com/github/catvod/spider/Introduce.java index 227728f1..c548be0f 100644 --- a/app/src/main/java/com/github/catvod/spider/Introduce.java +++ b/app/src/main/java/com/github/catvod/spider/Introduce.java @@ -1,11 +1,14 @@ package com.github.catvod.spider; import android.content.Context; +import com.github.catvod.api.QRCodeHandler; +import com.github.catvod.bean.Class; import com.github.catvod.bean.Result; import com.github.catvod.bean.Vod; import com.github.catvod.crawler.Spider; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; public class Introduce extends Spider { @@ -19,6 +22,8 @@ public class Introduce extends Spider { @Override public String homeContent(boolean filter) throws Exception { + List classes = new ArrayList<>(); + classes.add(new Class("1", "UC")); List list = new ArrayList<>(); String pic = "https://androidcatvodspider.netlify.app/wechat.png"; String name = "关注公众号"; @@ -29,4 +34,30 @@ public class Introduce extends Spider { return Result.string(list); } + + @Override + public String categoryContent(String tid, String pg, boolean filter, HashMap extend) { + List vodList = new ArrayList<>(); + //UC + if (tid.equals("1")) { + String pic = "https://androidcatvodspider.netlify.app/wechat.png"; + String name = "点击设置Token"; + vodList.add(new Vod("UCToken", name, pic)); + } + return Result.get().vod(vodList).string(); + } + + @Override + public String detailContent(List ids) throws Exception { + String vodId = ids.get(0); + + //UC Token 扫码 + if (vodId.equals("UCToken")) { + QRCodeHandler qrCodeHandler = new QRCodeHandler(); + qrCodeHandler.startUC_TOKENScan(); + } + Vod item = new Vod(); + return Result.string(item); + } + } \ No newline at end of file diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index 69adedc9..3ee9a664 100644 Binary files a/jar/custom_spider.jar and b/jar/custom_spider.jar differ diff --git a/jar/custom_spider.jar.md5 b/jar/custom_spider.jar.md5 index 50b4cf5a..abbbc0c9 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -08f32c03492c9516144a7145287d5a7c +cee419bf14ff0ade3824575ca16fd428 diff --git a/json/index.json b/json/index.json index 90264eb2..fb4b2b73 100644 --- a/json/index.json +++ b/json/index.json @@ -1,5 +1,5 @@ { - "spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;08f32c03492c9516144a7145287d5a7c", + "spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;cee419bf14ff0ade3824575ca16fd428", "lives": [ { diff --git a/json/index1.json b/json/index1.json index 86ec98c0..0d795612 100644 --- a/json/index1.json +++ b/json/index1.json @@ -1,5 +1,5 @@ { - "spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;08f32c03492c9516144a7145287d5a7c", + "spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;cee419bf14ff0ade3824575ca16fd428", "lives": [ { "name": "直播ipv6", diff --git a/json/index2.json b/json/index2.json index ed6656f5..356790cf 100644 --- a/json/index2.json +++ b/json/index2.json @@ -1,5 +1,5 @@ { - "spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;08f32c03492c9516144a7145287d5a7c", + "spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;cee419bf14ff0ade3824575ca16fd428", "lives": [ { "name": "直播ipv6", diff --git a/json/test.json b/json/test.json index f828a7eb..4dc918eb 100644 --- a/json/test.json +++ b/json/test.json @@ -1,5 +1,5 @@ { - "spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;08f32c03492c9516144a7145287d5a7c", + "spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;cee419bf14ff0ade3824575ca16fd428", "lives": [ { "name": "直播",