1. onedrive

常规测试
This commit is contained in:
QAIU
2024-12-18 11:46:06 +08:00
parent 54cc212753
commit 4a3e734408
9 changed files with 482 additions and 20 deletions

View File

@@ -36,7 +36,7 @@ public abstract class PanBase implements IPanTool {
* Http client
*/
protected WebClient client = WebClient.create(WebClientVertxInit.get(),
new WebClientOptions().setUserAgentEnabled(false));
new WebClientOptions());
/**
* Http client session (会话管理, 带cookie请求)

View File

@@ -90,9 +90,10 @@ public enum PanDomainTemplate {
"https://qaiu.118pan.com/b{shareKey}",
P118Tool.class),
// https://www.vyuyun.com/s/QMa6ie?password=I4KG7H
// https://www.vyuyun.com/s/QMa6ie/file?password=I4KG7H
PVYY("微雨云存储",
compile("https://www\\.vyuyun\\.com/s/(?<KEY>[a-zA-Z\\d-]+)(\\?password=.*)?"),
"https://www.vyuyun.com/s/{shareKey}",
compile("https://www\\.vyuyun\\.com/s/(?<KEY>[a-zA-Z\\d-]+)(/file)?(\\?password=(?<PWD>\\w+))?"),
"https://www.vyuyun.com/s/{shareKey}?password={pwd}",
PvyyTool.class),
// https://1drv.ms/w/s!Alg0feQmCv2rnRFd60DQOmMa-Oh_?e=buaRtp
POD("OneDrive",

View File

@@ -43,9 +43,11 @@ public class ParserCreate {
// 返回规范化的标准链接
String standardUrl = getStandardUrlTemplate()
.replace("{shareKey}", shareKey);
try {
String pwd = matcher.group(PWD);
if (StringUtils.isNotEmpty(pwd)) {
shareLinkInfo.setSharePassword(pwd);
}
standardUrl = standardUrl .replace("{pwd}", pwd);
} catch (Exception ignored) {}
@@ -107,7 +109,9 @@ public class ParserCreate {
}
public ParserCreate setShareLinkInfoPwd(String pwd) {
shareLinkInfo.setSharePassword(pwd);
if (pwd != null) {
shareLinkInfo.setSharePassword(pwd);
}
return this;
}

View File

@@ -1,6 +1,6 @@
package cn.qaiu.parser.impl;
import cn.qaiu.entity.ShareLinkInfo;
import cn.qaiu.entity.ShareLinkInfo;
import cn.qaiu.parser.PanBase;
import io.vertx.core.Future;
import io.vertx.core.json.JsonArray;

View File

@@ -7,7 +7,6 @@ import io.vertx.core.Future;
import io.vertx.core.Promise;
import io.vertx.core.WorkerExecutor;
import io.vertx.core.json.JsonObject;
import io.vertx.core.net.ProxyOptions;
import io.vertx.uritemplate.UriTemplate;
import java.io.IOException;
@@ -82,7 +81,6 @@ public class PodTool extends PanBase {
.setTemplateParam("resid1", cid2)
.setTemplateParam("cid", cid1.toLowerCase())
.setTemplateParam("redeem", redeem)
.proxy(new ProxyOptions().setHost("127.0.0.1").setPort(7890))
.send()
.onSuccess(r1 -> {
String auth =