Don't need authorization when get file list

This commit is contained in:
FongMi 2023-06-26 18:26:02 +08:00
parent 5a39410292
commit 2ab5cf5df0
6 changed files with 8 additions and 4 deletions

View File

@ -118,9 +118,9 @@ public class API {
private HashMap<String, String> getHeaderAuth() {
HashMap<String, String> 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;
}

View File

@ -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 = "";

Binary file not shown.

View File

@ -1 +1 @@
7398eb8460de8e8da9e898f465524414
493c8d428897bd6133ffd22eb1cb0495

View File

@ -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": [
{

View File

@ -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": [
{