diff --git a/app/src/main/java/com/github/catvod/ali/API.java b/app/src/main/java/com/github/catvod/ali/API.java index c531db8d..5319b9a9 100644 --- a/app/src/main/java/com/github/catvod/ali/API.java +++ b/app/src/main/java/com/github/catvod/ali/API.java @@ -118,9 +118,9 @@ public class API { private HashMap getHeaderAuth() { HashMap headers = getHeader(); - headers.put("authorization", user.getAuthorization()); headers.put("x-share-token", shareToken); headers.put("X-Canary", "client=Android,app=adrive,version=v4.3.1"); + if (user.isAuthed()) headers.put("authorization", user.getAuthorization()); return headers; } diff --git a/app/src/main/java/com/github/catvod/bean/ali/User.java b/app/src/main/java/com/github/catvod/bean/ali/User.java index 596f4187..9b66f3f5 100644 --- a/app/src/main/java/com/github/catvod/bean/ali/User.java +++ b/app/src/main/java/com/github/catvod/bean/ali/User.java @@ -53,6 +53,10 @@ public class User { return getTokenType() + " " + getAccessToken(); } + public boolean isAuthed() { + return getTokenType().length() > 0 && getAccessToken().length() > 0; + } + public User clean() { this.refreshToken = ""; this.accessToken = ""; diff --git a/jar/custom_spider.jar b/jar/custom_spider.jar index 56fcd093..dd5c88f3 100644 Binary files a/jar/custom_spider.jar and b/jar/custom_spider.jar differ diff --git a/jar/custom_spider.jar.md5 b/jar/custom_spider.jar.md5 index 099c0bd2..93bbfd46 100644 --- a/jar/custom_spider.jar.md5 +++ b/jar/custom_spider.jar.md5 @@ -1 +1 @@ -7398eb8460de8e8da9e898f465524414 +493c8d428897bd6133ffd22eb1cb0495 diff --git a/json/adult.json b/json/adult.json index 7ca16a6c..23ff3e72 100644 --- a/json/adult.json +++ b/json/adult.json @@ -1,5 +1,5 @@ { - "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;7398eb8460de8e8da9e898f465524414", + "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;493c8d428897bd6133ffd22eb1cb0495", "wallpaper": "https://gao.chuqiuyu.tk", "sites": [ { diff --git a/json/config.json b/json/config.json index cd263f0f..9d93f747 100644 --- a/json/config.json +++ b/json/config.json @@ -1,5 +1,5 @@ { - "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;7398eb8460de8e8da9e898f465524414", + "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;493c8d428897bd6133ffd22eb1cb0495", "wallpaper": "http://饭太硬.top/深色壁纸/api.php", "sites": [ {