{"record":{"id":"262b2bee18239747","repo":"fish2018/pansou","slug":"w-262b2b","errorCode":null,"errorMessage":"获取搜索结果失败: %w","messagePattern":"获取搜索结果失败: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/xb6v/xb6v.go","lineNumber":287,"sourceCode":"\t}\n\n\t// 构建完整的搜索结果URL\n\t// Location通常是类似 \"result/?searchid=39616\" 的格式，需要加上 /e/search/ 前缀\n\tvar resultURL string\n\tif strings.HasPrefix(location, \"result/\") {\n\t\tresultURL = p.currentBase + \"/e/search/\" + location\n\t} else {\n\t\tresultURL = p.currentBase + \"/\" + strings.TrimPrefix(location, \"/\")\n\t}\n\n\tif p.debugMode {\n\t\tlog.Printf(\"[Xb6v] 搜索结果页面: %s\", resultURL)\n\t}\n\n\t// 第二步：获取搜索结果页面\n\tresp2, err := p.doRequest(client, \"GET\", resultURL, \"\", p.currentBase)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"获取搜索结果失败: %w\", err)\n\t}\n\tdefer resp2.Body.Close()\n\n\tif resp2.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"搜索结果响应状态码异常: %d\", resp2.StatusCode)\n\t}\n\n\t// 解析搜索结果页面\n\treader, err := p.getResponseReader(resp2)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdoc, err := goquery.NewDocumentFromReader(reader)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"解析搜索结果HTML失败: %w\", err)\n\t}\n","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/xb6v/xb6v.go#L269-L305","documentation":"After extracting the redirect target, xb6v's searchImpl performs a second GET to the search-results URL (e.g. /e/search/result/?searchid=N). Any transport-level failure of that request is wrapped as this error. It indicates the results page could not be fetched at all — not a bad status code (that's a separate error).","triggerScenarios":"p.doRequest GET on resultURL fails: DNS resolution failure, TCP connect refused/timeout, TLS error, or the request context/transport returned an error for the second-hop results page.","commonSituations":"The mirror's result path is behind a different host that's down; the searchid expired quickly and the server dropped the connection; corporate proxy blocks the second URL; DNS for the mirror intermittently fails.","solutions":["Retry the search — result pages often expire or the connection may be transiently unavailable.","Open the resultURL printed in debug logs in a browser to check if the mirror is reachable at all.","Check proxy/firewall/DNS settings for the plugin's configured base host.","Reconfigure to a working mirror base URL if the current one is defunct."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"resp, err := http.Head(mirrorBase); if err != nil || resp.StatusCode != 200 { /* mirror unreachable — pick another */ }","typeGuard":null,"tryCatchPattern":"results, err := pluginSearch(keyword)\nif err != nil && strings.Contains(err.Error(), \"获取搜索结果失败\") {\n\tif errors.Is(err, context.DeadlineExceeded) || isNetError(err) {\n\t\t// retry once, then fail over to another mirror\n\t}\n}","preventionTips":["Check mirror availability before searches.","Configure multiple mirrors for failover.","Ensure DNS and proxy settings permit access to the mirror host."],"tags":["network","http","timeout","dns"],"backgroundTag":"http-request-failed","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"}