Update alist api url
This commit is contained in:
parent
b2f3e1b6b0
commit
8b9c88e03e
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -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.
|
|
@ -1 +1 @@
|
||||||
16f9147da64cbbc596831e87ebcafd79
|
16f80f13f3bd4b6fedfb3af5f5b3d3d0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue