Skip to content

Commit

Permalink
1. onedrive
Browse files Browse the repository at this point in the history
常规测试
  • Loading branch information
qaiu committed Dec 18, 2024
1 parent 54cc212 commit 4a3e734
Show file tree
Hide file tree
Showing 9 changed files with 482 additions and 20 deletions.
6 changes: 3 additions & 3 deletions note.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Cloudreve自建网盘 (ce) {origin}/s/{shareKey}
缓存key -> 下载URL
分享链接 -> add 网盘类型 pwd origin(私有化) -> 直链


https://f.ws59.cn/f/e3peohu6192

开源版 TODO
1. 缓存优化, 配置自动重载
2. 缓存删除接口(后台功能)
3. JS脚本引擎 自定义解析



专属版 功能设计
Expand Down
2 changes: 1 addition & 1 deletion parser/src/main/java/cn/qaiu/parser/PanBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -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请求)
Expand Down
5 changes: 3 additions & 2 deletions parser/src/main/java/cn/qaiu/parser/PanDomainTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 6 additions & 2 deletions parser/src/main/java/cn/qaiu/parser/ParserCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ public ParserCreate normalizeShareLink() {
// 返回规范化的标准链接
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) {}

Expand Down Expand Up @@ -107,7 +109,9 @@ public ShareLinkInfo getShareLinkInfo() {
}

public ParserCreate setShareLinkInfoPwd(String pwd) {
shareLinkInfo.setSharePassword(pwd);
if (pwd != null) {
shareLinkInfo.setSharePassword(pwd);
}
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion parser/src/main/java/cn/qaiu/parser/impl/EcTool.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 0 additions & 2 deletions parser/src/main/java/cn/qaiu/parser/impl/PodTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
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;
Expand Down Expand Up @@ -82,7 +81,6 @@ public Future<String> parse() {
.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 =
Expand Down
4 changes: 2 additions & 2 deletions web-front/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<img :height="150" src="../public/images/lanzou111.png" alt="lz"></img>
</div>
</div>
<h3 style="text-align: center;">NFD网盘直链解析0.1.8_bate2(API演示)</h3>
<h3 style="text-align: center;">NFD网盘直链解析0.1.8_bate3(API演示)</h3>
<div class="typo">
<p style="text-align: center;">
<span>
Expand Down Expand Up @@ -66,7 +66,7 @@
<p style="text-align: center">
<el-button style="margin-left: 40px;margin-bottom: 10px" @click="onSubmit">解析测试</el-button>
<el-button style="margin-left: 20px;margin-bottom: 10px" @click="genMd">生成Markdown链接</el-button>
<el-button style="margin-left: 20px" @click="generateQRCode">生成二维码</el-button>
<el-button style="margin-left: 20px" @click="generateQRCode">扫码下载</el-button>
<el-button style="margin-left: 20px" @click="getTj">链接信息统计</el-button>
</p>
</div>
Expand Down
14 changes: 7 additions & 7 deletions web-service/src/main/resources/app-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cache:
cow:
ec:
fc:
fj: 30
fj:
iz: 20
le: 2879
lz: 20
Expand All @@ -67,12 +67,12 @@ cache:

# httpClient静态代理服务器配置(外网代理)
proxy:
- panTypes: pgd,pdb
type: http # 支持http/socks4/socks5
host: 127.0.0.1
port: 7890
username:
password:
# - panTypes: pgd,pdb,pod
# type: http # 支持http/socks4/socks5
# host: 127.0.0.1
# port: 7890
# username:
# password:


# 代理池配置
Expand Down
Loading

0 comments on commit 4a3e734

Please sign in to comment.