设置可clean cookie
This commit is contained in:
parent
55aee25982
commit
68a38cdb38
|
|
@ -8,6 +8,7 @@ import android.view.Gravity;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import com.github.catvod.bean.tianyi.Cache;
|
import com.github.catvod.bean.tianyi.Cache;
|
||||||
|
import com.github.catvod.bean.tianyi.User;
|
||||||
import com.github.catvod.crawler.SpiderDebug;
|
import com.github.catvod.crawler.SpiderDebug;
|
||||||
import com.github.catvod.net.OkHttpWithCookie;
|
import com.github.catvod.net.OkHttpWithCookie;
|
||||||
import com.github.catvod.net.OkResult;
|
import com.github.catvod.net.OkResult;
|
||||||
|
|
@ -34,7 +35,7 @@ public class TianYiHandler {
|
||||||
public static final String API_URL = "https://open.e.189.cn";
|
public static final String API_URL = "https://open.e.189.cn";
|
||||||
private ScheduledExecutorService service;
|
private ScheduledExecutorService service;
|
||||||
private AlertDialog dialog;
|
private AlertDialog dialog;
|
||||||
private final Cache cache;
|
private Cache cache = null;
|
||||||
|
|
||||||
public File getCache() {
|
public File getCache() {
|
||||||
return Path.tv("tianyi");
|
return Path.tv("tianyi");
|
||||||
|
|
@ -58,6 +59,11 @@ public class TianYiHandler {
|
||||||
cookieJar = new SimpleCookieJar();
|
cookieJar = new SimpleCookieJar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cleanCookie() {
|
||||||
|
|
||||||
|
cache.setTianyiUser(new User(""));
|
||||||
|
}
|
||||||
|
|
||||||
public SimpleCookieJar getCookieJar() {
|
public SimpleCookieJar getCookieJar() {
|
||||||
return cookieJar;
|
return cookieJar;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public class Introduce extends Spider {
|
||||||
String name2 = "本接口不收费,请不要付费,谢谢!";
|
String name2 = "本接口不收费,请不要付费,谢谢!";
|
||||||
list.add(new Vod("https://androidcatvodspider.netlify.app/wechat.png", name2, pic2));
|
list.add(new Vod("https://androidcatvodspider.netlify.app/wechat.png", name2, pic2));
|
||||||
String pic3 = "https://androidcatvodspider.netlify.app/wechat.png";
|
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));
|
list.add(new Vod("https://androidcatvodspider.netlify.app/wechat.png", name3, pic3));
|
||||||
return Result.string(classes, list);
|
return Result.string(classes, list);
|
||||||
}
|
}
|
||||||
|
|
@ -54,6 +54,9 @@ public class Introduce extends Spider {
|
||||||
String pic = "https://androidcatvodspider.netlify.app/wechat.png";
|
String pic = "https://androidcatvodspider.netlify.app/wechat.png";
|
||||||
String name = "点击设置cookie";
|
String name = "点击设置cookie";
|
||||||
vodList.add(new Vod("天翼cookie", name, pic));
|
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();
|
return Result.get().vod(vodList).string();
|
||||||
}
|
}
|
||||||
|
|
@ -71,6 +74,11 @@ public class Introduce extends Spider {
|
||||||
TianYiHandler qrCodeHandler = new TianYiHandler();
|
TianYiHandler qrCodeHandler = new TianYiHandler();
|
||||||
qrCodeHandler.startScan();
|
qrCodeHandler.startScan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vodId.equals("clean天翼cookie")) {
|
||||||
|
TianYiHandler qrCodeHandler = new TianYiHandler();
|
||||||
|
qrCodeHandler.cleanCookie();
|
||||||
|
}
|
||||||
Vod item = new Vod();
|
Vod item = new Vod();
|
||||||
item.setVodId(vodId);
|
item.setVodId(vodId);
|
||||||
item.setVodName("公众号");
|
item.setVodName("公众号");
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
71051da8d3f321cb2c1da13584c5cd1d
|
f462c2e9c66246b7f7b47568724e20c7
|
||||||
|
|
|
||||||
|
|
@ -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": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "电视直播",
|
"name": "电视直播",
|
||||||
|
|
|
||||||
|
|
@ -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": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "直播ipv6",
|
"name": "直播ipv6",
|
||||||
|
|
|
||||||
|
|
@ -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": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "直播ipv6",
|
"name": "直播ipv6",
|
||||||
|
|
|
||||||
|
|
@ -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": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "直播",
|
"name": "直播",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue