细节优化

This commit is contained in:
QAIU
2023-07-21 10:29:21 +08:00
parent d6575d5b81
commit 60df94ce86
3 changed files with 6 additions and 6 deletions

View File

@@ -56,7 +56,7 @@ public class CowTool implements IPanTool {
}
log.error("cow parse fail: {}; json: {}", key, 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();
}

View File

@@ -57,9 +57,9 @@ public class FcTool implements IPanTool {
.set("requesttoken", token)
.set("password", code)).onSuccess(res2 -> {
if (res2.statusCode() == 302) {
sClient.getAbs(res2.getHeader("Location")).send().onSuccess(res3 -> {
getDownURL(dataKey, promise, res3, sClient);
}).onFailure(t -> promise.fail(PanExceptionUtils.fillRunTimeException("Fc", dataKey, t)));
sClient.getAbs(res2.getHeader("Location")).send().onSuccess(res3 ->
getDownURL(dataKey, promise, res3, sClient))
.onFailure(t -> promise.fail(PanExceptionUtils.fillRunTimeException("Fc", dataKey, t)));
return;
}
promise.fail(SHARE_URL_PREFIX + " 密码跳转后获取重定向失败 \n" + html);
@@ -71,7 +71,7 @@ public class FcTool implements IPanTool {
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) {
// 从HTML中找到文件id
String html = res.bodyAsString();

View File

@@ -62,7 +62,7 @@ public class LzTool implements IPanTool {
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();
var userAgent2 = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, " +
"like " +