Update alist api url

This commit is contained in:
FongMi 2023-06-26 08:50:50 +08:00
parent 952db868a1
commit a5c2566fd3
7 changed files with 19 additions and 21 deletions

View File

@ -37,6 +37,7 @@
-keep class net.engio.mbassy.** { *; } -keep class net.engio.mbassy.** { *; }
# Zxing # Zxing
-keep class com.google.zxing.** { *; }
-keepclassmembers enum * { -keepclassmembers enum * {
public static **[] values(); public static **[] values();
public static ** valueOf(java.lang.String); public static ** valueOf(java.lang.String);

View File

@ -5,7 +5,6 @@ import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.SystemClock; import android.os.SystemClock;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.Gravity; import android.view.Gravity;
@ -235,7 +234,7 @@ public class API {
JSONObject body = new JSONObject(); JSONObject body = new JSONObject();
body.put("code", code); body.put("code", code);
body.put("grant_type", "authorization_code"); body.put("grant_type", "authorization_code");
return alist("https://api-cf.nn.ci/alist/ali_open/code", body); return alist("https://api.xhofe.top/alist/ali_open/code", body);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
oauth.clean().save(); oauth.clean().save();
@ -250,7 +249,7 @@ public class API {
JSONObject body = new JSONObject(); JSONObject body = new JSONObject();
body.put("grant_type", "refresh_token"); body.put("grant_type", "refresh_token");
body.put("refresh_token", oauth.getRefreshToken()); body.put("refresh_token", oauth.getRefreshToken());
return alist("https://api-cf.nn.ci/alist/ali_open/token", body); return alist("https://api.xhofe.top/alist/ali_open/token", body);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
oauth.clean().save(); oauth.clean().save();
@ -532,9 +531,9 @@ public class API {
FrameLayout frame = new FrameLayout(Init.context()); FrameLayout frame = new FrameLayout(Init.context());
params.gravity = Gravity.CENTER; params.gravity = Gravity.CENTER;
frame.addView(image, params); frame.addView(image, params);
AlertDialog.Builder builder = new AlertDialog.Builder(Init.getActivity()).setView(frame); dialog = new AlertDialog.Builder(Init.getActivity()).setView(frame).create();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) builder.setOnDismissListener(this::dismiss); dialog.setOnDismissListener(this::dismiss);
dialog = builder.show(); dialog.show();
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
Init.show("請使用阿里雲盤 App 掃描二維碼"); Init.show("請使用阿里雲盤 App 掃描二維碼");
} catch (Exception ignored) { } catch (Exception ignored) {

View File

@ -20,7 +20,6 @@ import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** /**
* @author zhixc * @author zhixc
*/ */
@ -30,7 +29,6 @@ public class Wogg extends Ali {
private final Pattern regexAli = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)"); private final Pattern regexAli = Pattern.compile("(https://www.aliyundrive.com/s/[^\"]+)");
private Map<String, String> getHeader() { private Map<String, String> getHeader() {
Map<String, String> header = new HashMap<>(); Map<String, String> header = new HashMap<>();
header.put("User-Agent", Utils.CHROME); header.put("User-Agent", Utils.CHROME);
@ -42,6 +40,13 @@ public class Wogg extends Ali {
super.init(context, extend); super.init(context, extend);
} }
@Override
public String detailContent(List<String> ids) throws Exception {
Matcher matcher = regexAli.matcher(OkHttp.string(siteURL + ids.get(0), getHeader()));
if (matcher.find()) return super.detailContent(Arrays.asList(matcher.group(1)));
return "";
}
@Override @Override
public String searchContent(String key, boolean quick) throws Exception { public String searchContent(String key, boolean quick) throws Exception {
String searchURL = siteURL + "/index.php/vodsearch/-------------.html?wd=" + URLEncoder.encode(key); String searchURL = siteURL + "/index.php/vodsearch/-------------.html?wd=" + URLEncoder.encode(key);
@ -57,11 +62,4 @@ public class Wogg extends Ali {
} }
return Result.string(list); return Result.string(list);
} }
@Override
public String detailContent(List<String> ids) throws Exception {
Matcher matcher = regexAli.matcher(OkHttp.string(siteURL + ids.get(0), getHeader()));
if (matcher.find()) return super.detailContent(Arrays.asList(matcher.group(1)));
return "";
}
} }

Binary file not shown.

View File

@ -1 +1 @@
16f9147da64cbbc596831e87ebcafd79 16f80f13f3bd4b6fedfb3af5f5b3d3d0

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;16f9147da64cbbc596831e87ebcafd79", "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;16f80f13f3bd4b6fedfb3af5f5b3d3d0",
"wallpaper": "https://gao.chuqiuyu.tk", "wallpaper": "https://gao.chuqiuyu.tk",
"sites": [ "sites": [
{ {

View File

@ -1,5 +1,5 @@
{ {
"spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;16f9147da64cbbc596831e87ebcafd79", "spider": "https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;16f80f13f3bd4b6fedfb3af5f5b3d3d0",
"wallpaper": "http://饭太硬.top/深色壁纸/api.php", "wallpaper": "http://饭太硬.top/深色壁纸/api.php",
"sites": [ "sites": [
{ {
@ -170,10 +170,10 @@
"changeable": 1 "changeable": 1
}, },
{ {
"key": "土狗", "key": "玩偶",
"name": "土狗", "name": "玩偶",
"type": 3, "type": 3,
"api": "csp_TuGou", "api": "csp_Wogg",
"searchable": 1, "searchable": 1,
"changeable": 0 "changeable": 0
}, },