天意accessToken
This commit is contained in:
parent
0b895730e8
commit
e5447fc5a1
|
|
@ -12,6 +12,7 @@ import com.google.gson.JsonObject;
|
|||
import okhttp3.Cookie;
|
||||
import okhttp3.CookieJar;
|
||||
import okhttp3.HttpUrl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -34,6 +35,11 @@ public class SimpleCookieJar implements CookieJar {
|
|||
|
||||
public SimpleCookieJar() {
|
||||
this.cache = Cache.objectFrom(Path.read(getCache()));
|
||||
String cookieStr = cache.getUser().getCookie();
|
||||
if (StringUtils.isNoneBlank(cookieStr)) {
|
||||
JsonObject cookieJson = Json.safeObject(cookieStr);
|
||||
setGlobalCookie(cookieJson);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ public class TianYiHandler {
|
|||
private ScheduledExecutorService service;
|
||||
private AlertDialog dialog;
|
||||
private final Cache cache;
|
||||
private final Cache ecache;
|
||||
|
||||
public File getCache() {
|
||||
return Path.tv("tianyi");
|
||||
|
|
@ -56,8 +55,6 @@ public class TianYiHandler {
|
|||
|
||||
|
||||
cache = Cache.objectFrom(Path.read(getCache()));
|
||||
ecache = Cache.objectFrom(Path.read(geteCache()));
|
||||
|
||||
cookieJar = new SimpleCookieJar();
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
fabff6d0293436b616892579a9d1e3e3
|
||||
1d71c8fceb2eb53953b31019774eeb86
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://raw.kkgithub.com/lushunming/AndroidCatVodSpider/tyCookieJar/jar/custom_spider.jar;md5;fabff6d0293436b616892579a9d1e3e3",
|
||||
"spider": "https://raw.kkgithub.com/lushunming/AndroidCatVodSpider/tyCookieJar/jar/custom_spider.jar;md5;1d71c8fceb2eb53953b31019774eeb86",
|
||||
"lives": [
|
||||
{
|
||||
"name": "电视直播",
|
||||
|
|
|
|||
Loading…
Reference in New Issue