mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 12:23:03 +00:00
1. 123后缀处理 2. 修复缓存时间戳格式问题
This commit is contained in:
@@ -57,8 +57,8 @@ public enum PanDomainTemplate {
|
|||||||
WsTool.class),
|
WsTool.class),
|
||||||
// https://www.123pan.com/s/
|
// https://www.123pan.com/s/
|
||||||
YE("123网盘",
|
YE("123网盘",
|
||||||
"https://www\\.123pan\\.com/s/(.+)\\.html",
|
"https://www\\.123pan\\.com/s/(.+)",
|
||||||
"https://www.123pan.com/s/{shareKey}.html",
|
"https://www.123pan.com/s/{shareKey}",
|
||||||
YeTool.class),
|
YeTool.class),
|
||||||
// https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data={code}&isShare=1
|
// https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data={code}&isShare=1
|
||||||
EC("移动云空间",
|
EC("移动云空间",
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public class LogStatistics implements AfterInterceptor {
|
|||||||
|
|
||||||
ParserLogInfo parserLogInfo = new ParserLogInfo();
|
ParserLogInfo parserLogInfo = new ParserLogInfo();
|
||||||
parserLogInfo.setPath(ctx.request().uri());
|
parserLogInfo.setPath(ctx.request().uri());
|
||||||
|
if (responseData == null) return;
|
||||||
if (responseData.containsKey("code") && responseData.getInteger("code") == 500) {
|
if (responseData.containsKey("code") && responseData.getInteger("code") == 500) {
|
||||||
log.error("code 500: {} {}", ctx.request().path(), responseData.getString("msg"));
|
log.error("code 500: {} {}", ctx.request().path(), responseData.getString("msg"));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -21,15 +21,18 @@ public class URLParamUtil {
|
|||||||
* @return 完整的URL字符串
|
* @return 完整的URL字符串
|
||||||
*/
|
*/
|
||||||
public static String parserParams(HttpServerRequest request) {
|
public static String parserParams(HttpServerRequest request) {
|
||||||
|
|
||||||
String url = request.absoluteURI();
|
String url = request.absoluteURI();
|
||||||
MultiMap params = request.params();
|
MultiMap params = request.params();
|
||||||
|
|
||||||
// 处理URL截断的情况,例如: url='https://...&key=...&code=...'
|
// 处理URL截断的情况,例如: url='https://...&key=...&code=...'
|
||||||
if (params.contains("url")) {
|
if (params.contains("url")) {
|
||||||
String encodedUrl = params.get("url");
|
String encodedUrl = params.get("url");
|
||||||
url = handleTruncatedUrl(encodedUrl, params);
|
url = handleTruncatedUrl(encodedUrl, params);
|
||||||
|
if (url.endsWith(".html")) {
|
||||||
|
// 123云盘的后缀处理
|
||||||
|
url = url.replace(".html", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class CacheServiceImpl implements CacheService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String generateDate(Long ts) {
|
private String generateDate(Long ts) {
|
||||||
return DateFormatUtils.format(new Date(ts), "yyyy-MM-dd hh:mm:ss");
|
return DateFormatUtils.format(new Date(ts), "yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user