mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-06-10 15:37:28 +00:00
fix(QQscTool): 简化 filesetId 正则,避免反斜杠转义问题
This commit is contained in:
@@ -281,11 +281,10 @@ public class QQscTool extends PanBase {
|
||||
* 从 HTML 的 __NUXT_DATA__ 中提取 fileset_id
|
||||
*/
|
||||
String extractFilesetId(String html) {
|
||||
// Nuxt __NUXT_DATA__ 中 fileset_id 出现在缓存 key 的嵌套转义 JSON 中:
|
||||
// {\"fileset_id\":\"0500417e-5431-433f-a9f3-d5ccf9412da3\"}
|
||||
// 匹配 \"fileset_id\" 后面最近的 UUID
|
||||
// Nuxt __NUXT_DATA__ 中 fileset_id 出现在缓存 key 的嵌套 JSON 中
|
||||
// 直接匹配 fileset_id 后面最近的 UUID(跳过转义引号、冒号等非hex字符)
|
||||
Pattern pattern = Pattern.compile(
|
||||
"\\\\\"fileset_id\\\\\"[^a-f0-9]*([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})");
|
||||
"fileset_id[^a-f0-9]*([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})");
|
||||
Matcher matcher = pattern.matcher(html);
|
||||
if (matcher.find()) {
|
||||
return matcher.group(1);
|
||||
|
||||
Reference in New Issue
Block a user