Skip to content

Commit 4a3e734

Browse files
committed
1. onedrive
常规测试
1 parent 54cc212 commit 4a3e734

File tree

9 files changed

+482
-20
lines changed

9 files changed

+482
-20
lines changed

note.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ Cloudreve自建网盘 (ce) {origin}/s/{shareKey}
2020
缓存key -> 下载URL
2121
分享链接 -> add 网盘类型 pwd origin(私有化) -> 直链
2222

23-
24-
https://f.ws59.cn/f/e3peohu6192
25-
2623
开源版 TODO
2724
1. 缓存优化, 配置自动重载
25+
2. 缓存删除接口(后台功能)
26+
3. JS脚本引擎 自定义解析
27+
2828

2929

3030
专属版 功能设计

parser/src/main/java/cn/qaiu/parser/PanBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public abstract class PanBase implements IPanTool {
3636
* Http client
3737
*/
3838
protected WebClient client = WebClient.create(WebClientVertxInit.get(),
39-
new WebClientOptions().setUserAgentEnabled(false));
39+
new WebClientOptions());
4040

4141
/**
4242
* Http client session (会话管理, 带cookie请求)

parser/src/main/java/cn/qaiu/parser/PanDomainTemplate.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ public enum PanDomainTemplate {
9090
"https://qaiu.118pan.com/b{shareKey}",
9191
P118Tool.class),
9292
// https://www.vyuyun.com/s/QMa6ie?password=I4KG7H
93+
// https://www.vyuyun.com/s/QMa6ie/file?password=I4KG7H
9394
PVYY("微雨云存储",
94-
compile("https://www\\.vyuyun\\.com/s/(?<KEY>[a-zA-Z\\d-]+)(\\?password=.*)?"),
95-
"https://www.vyuyun.com/s/{shareKey}",
95+
compile("https://www\\.vyuyun\\.com/s/(?<KEY>[a-zA-Z\\d-]+)(/file)?(\\?password=(?<PWD>\\w+))?"),
96+
"https://www.vyuyun.com/s/{shareKey}?password={pwd}",
9697
PvyyTool.class),
9798
// https://1drv.ms/w/s!Alg0feQmCv2rnRFd60DQOmMa-Oh_?e=buaRtp
9899
POD("OneDrive",

parser/src/main/java/cn/qaiu/parser/ParserCreate.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ public ParserCreate normalizeShareLink() {
4343
// 返回规范化的标准链接
4444
String standardUrl = getStandardUrlTemplate()
4545
.replace("{shareKey}", shareKey);
46-
4746
try {
4847
String pwd = matcher.group(PWD);
48+
if (StringUtils.isNotEmpty(pwd)) {
49+
shareLinkInfo.setSharePassword(pwd);
50+
}
4951
standardUrl = standardUrl .replace("{pwd}", pwd);
5052
} catch (Exception ignored) {}
5153

@@ -107,7 +109,9 @@ public ShareLinkInfo getShareLinkInfo() {
107109
}
108110

109111
public ParserCreate setShareLinkInfoPwd(String pwd) {
110-
shareLinkInfo.setSharePassword(pwd);
112+
if (pwd != null) {
113+
shareLinkInfo.setSharePassword(pwd);
114+
}
111115
return this;
112116
}
113117

parser/src/main/java/cn/qaiu/parser/impl/EcTool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package cn.qaiu.parser.impl;
22

3-
import cn.qaiu.entity.ShareLinkInfo;
3+
import cn.qaiu.entity.ShareLinkInfo;
44
import cn.qaiu.parser.PanBase;
55
import io.vertx.core.Future;
66
import io.vertx.core.json.JsonArray;

parser/src/main/java/cn/qaiu/parser/impl/PodTool.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import io.vertx.core.Promise;
88
import io.vertx.core.WorkerExecutor;
99
import io.vertx.core.json.JsonObject;
10-
import io.vertx.core.net.ProxyOptions;
1110
import io.vertx.uritemplate.UriTemplate;
1211

1312
import java.io.IOException;
@@ -82,7 +81,6 @@ public Future<String> parse() {
8281
.setTemplateParam("resid1", cid2)
8382
.setTemplateParam("cid", cid1.toLowerCase())
8483
.setTemplateParam("redeem", redeem)
85-
.proxy(new ProxyOptions().setHost("127.0.0.1").setPort(7890))
8684
.send()
8785
.onSuccess(r1 -> {
8886
String auth =

web-front/src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<img :height="150" src="../public/images/lanzou111.png" alt="lz"></img>
1111
</div>
1212
</div>
13-
<h3 style="text-align: center;">NFD网盘直链解析0.1.8_bate2(API演示)</h3>
13+
<h3 style="text-align: center;">NFD网盘直链解析0.1.8_bate3(API演示)</h3>
1414
<div class="typo">
1515
<p style="text-align: center;">
1616
<span>
@@ -66,7 +66,7 @@
6666
<p style="text-align: center">
6767
<el-button style="margin-left: 40px;margin-bottom: 10px" @click="onSubmit">解析测试</el-button>
6868
<el-button style="margin-left: 20px;margin-bottom: 10px" @click="genMd">生成Markdown链接</el-button>
69-
<el-button style="margin-left: 20px" @click="generateQRCode">生成二维码</el-button>
69+
<el-button style="margin-left: 20px" @click="generateQRCode">扫码下载</el-button>
7070
<el-button style="margin-left: 20px" @click="getTj">链接信息统计</el-button>
7171
</p>
7272
</div>

web-service/src/main/resources/app-dev.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ cache:
5353
cow:
5454
ec:
5555
fc:
56-
fj: 30
56+
fj:
5757
iz: 20
5858
le: 2879
5959
lz: 20
@@ -67,12 +67,12 @@ cache:
6767

6868
# httpClient静态代理服务器配置(外网代理)
6969
proxy:
70-
- panTypes: pgd,pdb
71-
type: http # 支持http/socks4/socks5
72-
host: 127.0.0.1
73-
port: 7890
74-
username:
75-
password:
70+
# - panTypes: pgd,pdb,pod
71+
# type: http # 支持http/socks4/socks5
72+
# host: 127.0.0.1
73+
# port: 7890
74+
# username:
75+
# password:
7676

7777

7878
# 代理池配置

0 commit comments

Comments
 (0)