mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-10 15:37:28 +00:00
fix(QQscTool): 检测被和谐文件,避免返回无效直链
This commit is contained in:
@@ -99,6 +99,11 @@ public class QQscTool extends PanBase {
|
|||||||
JsonArray downloadRsp = body.getJsonObject("data").getJsonArray("download_rsp");
|
JsonArray downloadRsp = body.getJsonObject("data").getJsonArray("download_rsp");
|
||||||
if (downloadRsp != null && !downloadRsp.isEmpty()) {
|
if (downloadRsp != null && !downloadRsp.isEmpty()) {
|
||||||
String url = downloadRsp.getJsonObject(0).getString("url");
|
String url = downloadRsp.getJsonObject(0).getString("url");
|
||||||
|
// 检测文件是否被和谐
|
||||||
|
if (url != null && url.startsWith("&filename=")) {
|
||||||
|
promise.fail("该文件已被和谐");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (fileName != null) {
|
if (fileName != null) {
|
||||||
url = url + "&filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8);
|
url = url + "&filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user