{"record":{"id":"6b3e99708fd3b428","repo":"fish2018/pansou","slug":"d-6b3e99","errorCode":null,"errorMessage":"搜索结果响应状态码异常: %d","messagePattern":"搜索结果响应状态码异常: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/xb6v/xb6v.go","lineNumber":292,"sourceCode":"\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\n\t// 提取搜索结果（详情页链接和日期）\n\tdetailPages := p.extractDetailURLs(doc)\n\n\tif p.debugMode {\n\t\tlog.Printf(\"[Xb6v] 找到 %d 个详情页链接\", len(detailPages))","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/xb6v/xb6v.go#L274-L310","documentation":"xb6v's searchImpl requires the second-hop search-results GET to return HTTP 200. Any other status code (404, 403, 500, 302 to captcha, etc.) triggers this error with the numeric status. It signals the results page exists logically but the server refused or failed to serve it.","triggerScenarios":"GET to the constructed resultURL (currentBase + /e/search/result/?searchid=N) returns a non-200 status: expired/invalid searchid (404), anti-bot blocking (403), server error (5xx), or a redirect to a challenge page.","commonSituations":"Stale searchid reused after the server pruned search sessions; rate limiting by the mirror returning 403/429; mirror misconfiguration causing the wrong path prefix so the result URL 404s; temporary 5xx during mirror maintenance.","solutions":["Retry with a fresh search — the searchid may have expired or the failure may be transient.","Log the resultURL (debug mode) and test it in a browser to see whether the path is valid.","Check for 403/429 and back off / rotate the mirror if the site is rate limiting.","Verify the base URL configuration so /e/search/ prefix resolves on the configured mirror."],"exampleFix":"// before\nif resp2.StatusCode != http.StatusOK {\n\treturn nil, fmt.Errorf(\"搜索结果响应状态码异常: %d\", resp2.StatusCode)\n}\n// after: treat 404 as expired searchid and signal a clean retry\nif resp2.StatusCode == http.StatusNotFound {\n\treturn nil, fmt.Errorf(\"搜索结果已过期(searchid失效)，请重新搜索\")\n}\nif resp2.StatusCode != http.StatusOK {\n\treturn nil, fmt.Errorf(\"搜索结果响应状态码异常: %d\", resp2.StatusCode)\n}","handlingStrategy":"retry","validationCode":"// probe the search endpoint before searching\nresp, err := client.Get(baseURL + \"/e/search/\"); if err == nil && resp.StatusCode == 403 { /* blocked — back off */ }","typeGuard":null,"tryCatchPattern":"results, err := pluginSearch(keyword)\nif err != nil {\n\tvar statusErr interface{ Error() string }\n\tif strings.Contains(err.Error(), \"搜索结果响应状态码异常\") {\n\t\t// extract status, back off on 403/429, fail over on 404/5xx\n\t}\n}","preventionTips":["Rate-limit searches to avoid 403/429 blocks.","Re-run searches to obtain a fresh searchid; never reuse old result URLs.","Rotate mirrors when blocked."],"tags":["http","http-status","anti-bot","scraping"],"backgroundTag":"http-non-200-response","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"}