{"record":{"id":"26cfae4676593163","repo":"fish2018/pansou","slug":"d-26cfae","errorCode":null,"errorMessage":"请求帖子详情页失败，状态码: %d","messagePattern":"请求帖子详情页失败，状态码: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/panta/panta.go","lineNumber":629,"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, err\n\t}\n\tdefer resp.Body.Close()\n\t\n\t// 检查状态码\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"请求帖子详情页失败，状态码: %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\ttitle := strings.TrimSpace(doc.Find(\"div.title\").Text())\n\t\n\t// 从标题中提取年份作为可能的提取码\n\tvar yearFromTitle string\n\tyearMatch := yearRegex.FindStringSubmatch(title)\n\tif len(yearMatch) >= 2 {\n\t\tyearFromTitle = yearMatch[1]\n\t}\n\t","sourceCodeStart":611,"sourceCodeEnd":647,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/panta/panta.go#L611-L647","documentation":"Status error in panta's fetchThreadLinks (plugin/panta/panta.go:629): the thread detail page returned a non-200 status after retries, so its links cannot be extracted. The search worked but the per-post fetch was rejected.","triggerScenarios":"Thrown at plugin/panta/panta.go:629 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["对单个详情页失败做降级，保留搜索层结果","确认是否需要登录 Cookie","对该帖子记录跳过原因"],"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"}