Compare commits

..

5 Commits

2 changed files with 21 additions and 27 deletions

View File

@@ -12,18 +12,9 @@ QQ交流群1017480890
<a href="https://trendshift.io/repositories/12101" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12101" alt="qaiu%2Fnetdisk-fast-download | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</p>
<div align="center" style="display:flex; justify-content:center; gap:10px; align-items:flex-start;">
<img
src="https://github.com/user-attachments/assets/bf266d0a-aaf8-4772-9231-e38a4b7bb6cb"
alt="image1"
style="width:300px; max-width:300px; flex:none;"
>
<img
src="https://github.com/user-attachments/assets/bb7a85f0-c256-4b4a-a11b-3ceb55afc302"
alt="image2"
style="width:300px; max-width:300px; flex:none;"
>
</div>
![alt text](web-front/img/image.png)
## 国内镜像

View File

@@ -37,6 +37,9 @@ public class WsTool extends PanBase {
MultiMap headers = MultiMap.caseInsensitiveMultiMap();
headers.set("User-Agent", userAgent2);
headers.set("Accept", "application/json, text/plain, */*");
headers.set("Content-Type", "application/json;charset=utf-8");
headers.set("Prod", "com.wenshushu.web.pc");
headers.set("sec-ch-ua-platform", "Android");
headers.set("Accept-Language", "zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2");
headers.set("sec-ch-ua-mobile", "sec-ch-ua-mobile");
@@ -50,7 +53,7 @@ public class WsTool extends PanBase {
try {
// 设置匿名登录token
String token = asJson(res).getJsonObject("data").getString("token");
headers.set("X-Token", token);
headers.set("X-TOKEN", token);
// 获取文件夹信息
httpClient.postAbs(SHARE_URL_API + "task/mgrtask").putHeaders(headers)
@@ -68,10 +71,10 @@ public class WsTool extends PanBase {
String filebid = asJson(res2).getJsonObject("data").getString("boxid"); // 文件夹bid
// 调试输出文件夹信息
System.out.println("文件夹期限: " + filetime);
System.out.println("文件夹大小: " + filesize);
System.out.println("文件夹pid: " + filepid);
System.out.println("文件夹bid: " + filebid);
log.debug("文件夹期限: {}", filetime);
log.debug("文件夹大小: {}", filesize);
log.debug("文件夹pid: {}", filepid);
log.debug("文件夹bid: {}", filebid);
// 获取文件信息
httpClient.postAbs(SHARE_URL_API + "ufile/list").putHeaders(headers)
@@ -92,21 +95,21 @@ public class WsTool extends PanBase {
if (res3.statusCode() == 200) {
try {
// 获取文件信息
String filename = asJson(res3).getJsonObject("data")
.getJsonArray("fileList").getJsonObject(0).getString("fname"); // 文件名称
String filefid = asJson(res3).getJsonObject("data")
.getJsonArray("fileList").getJsonObject(0).getString("fid"); // 文件fid
JsonObject fileInfo = asJson(res3).getJsonObject("data")
.getJsonArray("fileList").getJsonObject(0);
String filename = fileInfo.getString("fname"); // 文件名称
String fileUfileid = fileInfo.getString("ufileid", fileInfo.getString("fid")); // 文件ufileid
// 调试输出文件信息
System.out.println("文件名称: " + filename);
System.out.println("文件fid: " + filefid);
log.debug("文件名称: {}", filename);
log.debug("文件ufileid: {}", fileUfileid);
// 检查文件是否失效
httpClient.postAbs(SHARE_URL_API + "dl/sign").putHeaders(headers)
.sendJsonObject(JsonObject.of(
"consumeCode", 0,
"type", 1,
"ufileid", filefid
"ufileid", fileUfileid,
// 新版接口不再需要consumeCode
"type", 1
)).onSuccess(res4 -> {
if (res4.statusCode() == 200) {
@@ -115,7 +118,7 @@ public class WsTool extends PanBase {
String fileurl = asJson(res4).getJsonObject("data").getString("url");
// 调试输出文件直链
System.out.println("文件直链: " + fileurl);
log.debug("文件直链: {}", fileurl);
if (!fileurl.equals("")) {
promise.complete(URLDecoder.decode(fileurl, StandardCharsets.UTF_8));