天意cookie
This commit is contained in:
parent
022b5883f3
commit
6de0859e7f
|
|
@ -215,7 +215,7 @@ public class TianYiHandler {
|
|||
cookieList.add(cookie1);
|
||||
|
||||
}
|
||||
cache.setTokenUser(User.objectFrom(StringUtils.join(cookieList, ";")));
|
||||
cache.setTianyiUser(User.objectFrom(StringUtils.join(cookieList, ";")));
|
||||
SpiderDebug.log("获取cookie成功:" + StringUtils.join(cookieList, ";"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.github.catvod.bean.uc;
|
||||
|
||||
import com.github.catvod.api.TianYiHandler;
|
||||
import com.github.catvod.api.UCApi;
|
||||
import com.github.catvod.api.UCTokenHandler;
|
||||
import com.github.catvod.crawler.SpiderDebug;
|
||||
|
|
@ -34,10 +35,20 @@ public class Cache {
|
|||
this.saveToken();
|
||||
}
|
||||
|
||||
public void setTianyiUser(User user) {
|
||||
this.user = user;
|
||||
this.saveTianyiUser();
|
||||
}
|
||||
|
||||
public void saveTianyiUser() {
|
||||
Init.execute(() -> Path.write(new TianYiHandler().getCache(), toString()));
|
||||
}
|
||||
|
||||
public void saveToken() {
|
||||
Init.execute(() -> Path.write(new UCTokenHandler().getCache(), toString()));
|
||||
}
|
||||
|
||||
|
||||
public void save() {
|
||||
Init.execute(() -> Path.write(UCApi.get().getCache(), toString()));
|
||||
}
|
||||
|
|
@ -46,4 +57,6 @@ public class Cache {
|
|||
public String toString() {
|
||||
return new Gson().toJson(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
556fc6256b85baf4f830853d057fd0cd
|
||||
874733c7fb3892ec2108c35fba50c198
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/tianyidev/jar/custom_spider.jar;md5;556fc6256b85baf4f830853d057fd0cd",
|
||||
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/tianyidev/jar/custom_spider.jar;md5;874733c7fb3892ec2108c35fba50c198",
|
||||
"lives": [
|
||||
{
|
||||
"name": "电视直播",
|
||||
|
|
|
|||
Loading…
Reference in New Issue