{"record":{"id":"c0b1eea8bb149dd8","repo":"fish2018/pansou","slug":"panta-d","errorCode":null,"errorMessage":"请求PanTa搜索页面失败，状态码: %d","messagePattern":"请求PanTa搜索页面失败，状态码: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/panta/panta.go","lineNumber":269,"sourceCode":"\t// 设置User-Agent和Referer\n\treq.Header.Set(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\")\n\treq.Header.Set(\"Referer\", \"https://www.91panta.cn/index\")\n\treq.Header.Set(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\")\n\treq.Header.Set(\"Accept-Language\", \"zh-CN,zh;q=0.9,en;q=0.8\")\n\treq.Header.Set(\"Connection\", \"keep-alive\")\n\treq.Header.Set(\"Upgrade-Insecure-Requests\", \"1\")\n\treq.Header.Set(\"Cache-Control\", \"max-age=0\")\n\t\n\t// 使用带重试的请求方法发送HTTP请求\n\tresp, err := p.doRequestWithRetry(req, client)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"请求PanTa搜索页面失败: %v\", err)\n\t}\n\tdefer resp.Body.Close()\n\t\n\t// 检查状态码\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"请求PanTa搜索页面失败，状态码: %d\", resp.StatusCode)\n\t}\n\t\n\t// 使用goquery解析HTML\n\tdoc, err := goquery.NewDocumentFromReader(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"解析HTML失败: %v\", err)\n\t}\n\t\n\t// 解析搜索结果\n\tresults, err := p.parseSearchResults(doc, client)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t\n\t// 使用过滤功能过滤结果\n\tfilteredResults := plugin.FilterResultsByKeyword(results, keyword)\n\t\n\treturn filteredResults, nil","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/panta/panta.go#L251-L287","documentation":"Status error in PantaAsyncPlugin.doSearch (plugin/panta/panta.go:269): the PanTa search page responded with a non-200 status. The server was reached but rejected the request (rate limit, block, or redirect to a challenge).","triggerScenarios":"Thrown at plugin/panta/panta.go:269 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["补充/更新浏览器请求头","对 429 做退避重试","记录状态码监控站点健康"],"exampleFix":null,"handlingStrategy":"retry","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"}