{"record":{"id":"df00341747a5a64a","repo":"fish2018/pansou","slug":"url-s","errorCode":null,"errorMessage":"无效的详情页URL格式: %s","messagePattern":"无效的详情页URL格式: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/xuexizhinan/xuexizhinan.go","lineNumber":270,"sourceCode":"\treturn nil, nil\n}\n\n// processDetailPage 处理详情页，提取网盘链接和资源信息\nfunc (p *XuexizhinanPlugin) processDetailPage(client *http.Client, detailURL string) (*model.SearchResult, error) {\n\t// 检查缓存\n\tif cachedResult, ok := detailPageCache.Load(detailURL); ok {\n\t\tcachedResponse := cachedResult.(detailPageResponse)\n\t\t\n\t\t// 检查缓存是否过期\n\t\tif time.Since(cachedResponse.Timestamp) < cacheTTL {\n\t\t\treturn p.detailResponseToResult(detailURL, cachedResponse), nil\n\t\t}\n\t}\n\t\n\t// 正则匹配提取ID - 使用预编译的正则表达式\n\tmatches := detailURLRegex.FindStringSubmatch(detailURL)\n\tif len(matches) < 2 {\n\t\treturn nil, fmt.Errorf(\"无效的详情页URL格式: %s\", detailURL)\n\t}\n\t\n\t// 发送请求\n\treq, err := http.NewRequest(\"GET\", detailURL, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"创建请求失败: %w\", err)\n\t}\n\t\n\treq.Header.Set(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36\")\n\t\n\t// 添加请求超时控制\n\tctx, cancel := context.WithTimeout(req.Context(), DefaultTimeout)\n\tdefer cancel()\n\treq = req.WithContext(ctx)\n\t\n\t// 发送请求\n\tresp, err := client.Do(req)\n\tif err != nil {","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/xuexizhinan/xuexizhinan.go#L252-L288","documentation":"Regex guard in xuexizhinan processDetailPage: detailURL does not match detailURLRegex (no ID captured). Input at fault is the URL handed to the detail fetcher — stale or foreign-format link that escaped the earlier filters. Permanent per-URL failure; caching doesn't apply.","triggerScenarios":"Thrown at plugin/xuexizhinan/xuexizhinan.go:270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Skip the malformed detail URL rather than aborting the batch","Update detailURLRegex if the site changed its URL scheme","Validate URLs at extraction time in the search results"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}