天意cookie

This commit is contained in:
lushunming 2025-03-19 16:46:55 +08:00
parent 022b5883f3
commit 6de0859e7f
5 changed files with 16 additions and 3 deletions

View File

@ -215,7 +215,7 @@ public class TianYiHandler {
cookieList.add(cookie1); cookieList.add(cookie1);
} }
cache.setTokenUser(User.objectFrom(StringUtils.join(cookieList, ";"))); cache.setTianyiUser(User.objectFrom(StringUtils.join(cookieList, ";")));
SpiderDebug.log("获取cookie成功" + StringUtils.join(cookieList, ";")); SpiderDebug.log("获取cookie成功" + StringUtils.join(cookieList, ";"));
} }

View File

@ -1,5 +1,6 @@
package com.github.catvod.bean.uc; package com.github.catvod.bean.uc;
import com.github.catvod.api.TianYiHandler;
import com.github.catvod.api.UCApi; import com.github.catvod.api.UCApi;
import com.github.catvod.api.UCTokenHandler; import com.github.catvod.api.UCTokenHandler;
import com.github.catvod.crawler.SpiderDebug; import com.github.catvod.crawler.SpiderDebug;
@ -34,10 +35,20 @@ public class Cache {
this.saveToken(); 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() { public void saveToken() {
Init.execute(() -> Path.write(new UCTokenHandler().getCache(), toString())); Init.execute(() -> Path.write(new UCTokenHandler().getCache(), toString()));
} }
public void save() { public void save() {
Init.execute(() -> Path.write(UCApi.get().getCache(), toString())); Init.execute(() -> Path.write(UCApi.get().getCache(), toString()));
} }
@ -46,4 +57,6 @@ public class Cache {
public String toString() { public String toString() {
return new Gson().toJson(this); return new Gson().toJson(this);
} }
} }

Binary file not shown.

View File

@ -1 +1 @@
556fc6256b85baf4f830853d057fd0cd 874733c7fb3892ec2108c35fba50c198

View File

@ -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": [ "lives": [
{ {
"name": "电视直播", "name": "电视直播",