mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 12:23:03 +00:00
细节优化
This commit is contained in:
@@ -56,7 +56,7 @@ public class CowTool implements IPanTool {
|
|||||||
}
|
}
|
||||||
log.error("cow parse fail: {}; json: {}", key, resJson);
|
log.error("cow parse fail: {}; json: {}", key, resJson);
|
||||||
promise.fail("cow parse fail: " + key + "; json:" + resJson);
|
promise.fail("cow parse fail: " + key + "; json:" + resJson);
|
||||||
}).onFailure(t -> promise.fail(PanExceptionUtils.fillRunTimeException("Cow", key, t)));;
|
}).onFailure(t -> promise.fail(PanExceptionUtils.fillRunTimeException("Cow", key, t)));
|
||||||
return promise.future();
|
return promise.future();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ public class FcTool implements IPanTool {
|
|||||||
.set("requesttoken", token)
|
.set("requesttoken", token)
|
||||||
.set("password", code)).onSuccess(res2 -> {
|
.set("password", code)).onSuccess(res2 -> {
|
||||||
if (res2.statusCode() == 302) {
|
if (res2.statusCode() == 302) {
|
||||||
sClient.getAbs(res2.getHeader("Location")).send().onSuccess(res3 -> {
|
sClient.getAbs(res2.getHeader("Location")).send().onSuccess(res3 ->
|
||||||
getDownURL(dataKey, promise, res3, sClient);
|
getDownURL(dataKey, promise, res3, sClient))
|
||||||
}).onFailure(t -> promise.fail(PanExceptionUtils.fillRunTimeException("Fc", dataKey, t)));
|
.onFailure(t -> promise.fail(PanExceptionUtils.fillRunTimeException("Fc", dataKey, t)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
promise.fail(SHARE_URL_PREFIX + " 密码跳转后获取重定向失败 \n" + html);
|
promise.fail(SHARE_URL_PREFIX + " 密码跳转后获取重定向失败 \n" + html);
|
||||||
@@ -71,7 +71,7 @@ public class FcTool implements IPanTool {
|
|||||||
return promise.future();
|
return promise.future();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void getDownURL(String dataKey, Promise<String> promise, HttpResponse<Buffer> res,
|
private void getDownURL(String dataKey, Promise<String> promise, HttpResponse<Buffer> res,
|
||||||
WebClientSession sClient) {
|
WebClientSession sClient) {
|
||||||
// 从HTML中找到文件id
|
// 从HTML中找到文件id
|
||||||
String html = res.bodyAsString();
|
String html = res.bodyAsString();
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class LzTool implements IPanTool {
|
|||||||
return promise.future();
|
return promise.future();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void getDownURL(Promise<String> promise, String code, String key, WebClient client, String sign) {
|
private void getDownURL(Promise<String> promise, String code, String key, WebClient client, String sign) {
|
||||||
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
|
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
|
||||||
var userAgent2 = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, " +
|
var userAgent2 = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, " +
|
||||||
"like " +
|
"like " +
|
||||||
|
|||||||
Reference in New Issue
Block a user