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