Update gradle
This commit is contained in:
parent
b9ca8ddbd3
commit
715707d1ed
|
|
@ -4,12 +4,12 @@ plugins {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdk 32
|
||||
compileSdk 33
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.github.catvod.demo"
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
targetSdk 33
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ public class Result {
|
|||
private String header;
|
||||
@SerializedName("url")
|
||||
private String url;
|
||||
@SerializedName("sub")
|
||||
private String sub;
|
||||
@SerializedName("parse")
|
||||
private int parse;
|
||||
@SerializedName("jx")
|
||||
|
|
@ -111,6 +113,11 @@ public class Result {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Result sub(String sub) {
|
||||
this.sub = sub;
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<Vod> getList() {
|
||||
return list == null ? Collections.emptyList() : list;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ public class OkHttpUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public static String stringNoRedirect(String url, Map<String, String> headerMap, Map<String, List<String>> respHeaderMap) {
|
||||
return string(new OkHttpClient.Builder().dns(safeDns()).readTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS).writeTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS).connectTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS).followRedirects(false).followSslRedirects(false).retryOnConnectionFailure(true).sslSocketFactory(new SSLSocketFactoryCompat(SSLSocketFactoryCompat.trustAllCert), SSLSocketFactoryCompat.trustAllCert).build(), url, null, null, headerMap, respHeaderMap, OkHttpUtil.METHOD_GET);
|
||||
}
|
||||
|
||||
public static String string(OkHttpClient client, String url, String tag, Map<String, String> paramsMap, Map<String, String> headerMap, Map<String, List<String>> respHeaderMap, String httpMethod) {
|
||||
OKCallBack.OKCallBackString callback = new OKCallBack.OKCallBackString() {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ public class Bili extends Spider {
|
|||
String duration = extend.containsKey("duration") ? extend.get("duration") : "0";
|
||||
String url = "https://api.bilibili.com/x/web-interface/search/type?search_type=video&keyword=" + URLEncoder.encode(tid) + "&duration=" + duration + "&page=" + pg;
|
||||
JSONObject resp = new JSONObject(OkHttpUtil.string(url, header));
|
||||
System.out.println(resp.toString());
|
||||
JSONArray result = resp.getJSONObject("data").getJSONArray("result");
|
||||
List<Vod> list = new ArrayList<>();
|
||||
for (int i = 0; i < result.length(); ++i) {
|
||||
|
|
|
|||
|
|
@ -117,6 +117,18 @@ public class Misc {
|
|||
}
|
||||
}
|
||||
|
||||
public static String substring(String text) {
|
||||
return substring(text, 1);
|
||||
}
|
||||
|
||||
public static String substring(String text, int num) {
|
||||
if (text != null && text.length() > num) {
|
||||
return text.substring(0, text.length() - num);
|
||||
} else {
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
public static String MD5(String src) {
|
||||
return MD5(src, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'ru.cleverpumpkin.proguard-dictionaries-generator' version '1.0.8' apply false
|
||||
id 'com.android.application' version '7.2.1' apply false
|
||||
id 'com.android.library' version '7.2.1' apply false
|
||||
id 'com.android.application' version '7.3.0' apply false
|
||||
id 'com.android.library' version '7.3.0' apply false
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#Mon Aug 22 15:05:50 CST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
82496ffaa62feaa12a8318e606513308
|
||||
cbcd16258af92a42a19ca6897b7af950
|
||||
|
|
|
|||
Loading…
Reference in New Issue