{"record":{"id":"674ddb7de773bb3d","repo":"fish2018/pansou","slug":"html-v","errorCode":null,"errorMessage":"解析HTML失败: %v","messagePattern":"解析HTML失败: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/panta/panta.go","lineNumber":275,"sourceCode":"\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\n}\n\n// parseSearchResults 使用goquery解析搜索结果\nfunc (p *PantaAsyncPlugin) parseSearchResults(doc *goquery.Document, client *http.Client) ([]model.SearchResult, error) {\n\tvar results []model.SearchResult\n\t","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/panta/panta.go#L257-L293","documentation":"Wrapped parse error in PantaAsyncPlugin.doSearch (plugin/panta/panta.go:275): the 200 search page could not be parsed by goquery — typically a non-HTML body (challenge or error page) despite the OK status.","triggerScenarios":"Thrown at plugin/panta/panta.go:275 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["检查响应 Content-Type 与编码","解析前嗅探内容类型","记录原始响应排查网关改写"],"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"}