设置可clean cookie

This commit is contained in:
lushunming 2025-04-08 14:18:32 +08:00
parent 55aee25982
commit 68a38cdb38
8 changed files with 21 additions and 7 deletions

View File

@ -8,6 +8,7 @@ import android.view.Gravity;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.github.catvod.bean.tianyi.Cache;
import com.github.catvod.bean.tianyi.User;
import com.github.catvod.crawler.SpiderDebug;
import com.github.catvod.net.OkHttpWithCookie;
import com.github.catvod.net.OkResult;
@ -34,7 +35,7 @@ public class TianYiHandler {
public static final String API_URL = "https://open.e.189.cn";
private ScheduledExecutorService service;
private AlertDialog dialog;
private final Cache cache;
private Cache cache = null;
public File getCache() {
return Path.tv("tianyi");
@ -58,6 +59,11 @@ public class TianYiHandler {
cookieJar = new SimpleCookieJar();
}
public void cleanCookie() {
cache.setTianyiUser(new User(""));
}
public SimpleCookieJar getCookieJar() {
return cookieJar;
}

View File

@ -34,7 +34,7 @@ public class Introduce extends Spider {
String name2 = "本接口不收费,请不要付费,谢谢!";
list.add(new Vod("https://androidcatvodspider.netlify.app/wechat.png", name2, pic2));
String pic3 = "https://androidcatvodspider.netlify.app/wechat.png";
String name3 = "v3";
String name3 = "2025-04-08 13:52";
list.add(new Vod("https://androidcatvodspider.netlify.app/wechat.png", name3, pic3));
return Result.string(classes, list);
}
@ -54,6 +54,9 @@ public class Introduce extends Spider {
String pic = "https://androidcatvodspider.netlify.app/wechat.png";
String name = "点击设置cookie";
vodList.add(new Vod("天翼cookie", name, pic));
String pic1 = "https://androidcatvodspider.netlify.app/wechat.png";
String name1 = "清除cookie";
vodList.add(new Vod("clean天翼cookie", name1, pic1));
}
return Result.get().vod(vodList).string();
}
@ -71,6 +74,11 @@ public class Introduce extends Spider {
TianYiHandler qrCodeHandler = new TianYiHandler();
qrCodeHandler.startScan();
}
if (vodId.equals("clean天翼cookie")) {
TianYiHandler qrCodeHandler = new TianYiHandler();
qrCodeHandler.cleanCookie();
}
Vod item = new Vod();
item.setVodId(vodId);
item.setVodName("公众号");

Binary file not shown.

View File

@ -1 +1 @@
71051da8d3f321cb2c1da13584c5cd1d
f462c2e9c66246b7f7b47568724e20c7

View File

@ -1,5 +1,5 @@
{
"spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;71051da8d3f321cb2c1da13584c5cd1d",
"spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;f462c2e9c66246b7f7b47568724e20c7",
"lives": [
{
"name": "电视直播",

View File

@ -1,5 +1,5 @@
{
"spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;71051da8d3f321cb2c1da13584c5cd1d",
"spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;f462c2e9c66246b7f7b47568724e20c7",
"lives": [
{
"name": "直播ipv6",

View File

@ -1,5 +1,5 @@
{
"spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;71051da8d3f321cb2c1da13584c5cd1d",
"spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;f462c2e9c66246b7f7b47568724e20c7",
"lives": [
{
"name": "直播ipv6",

View File

@ -1,5 +1,5 @@
{
"spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;71051da8d3f321cb2c1da13584c5cd1d",
"spider": "https://androidcatvodspider.netlify.app/jar/custom_spider.jar;md5;f462c2e9c66246b7f7b47568724e20c7",
"lives": [
{
"name": "直播",