{"record":{"id":"5dfbf0aa09e46aeb","repo":"fish2018/pansou","slug":"error-5dfbf0","errorCode":null,"errorMessage":"提取凭证失败","messagePattern":"提取凭证失败","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/panyq/panyq.go","lineNumber":982,"sourceCode":"\tdefer resp.Body.Close()\n\t\n\t// 读取响应\n\tbody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t\n\t// 使用正则表达式提取凭证\n\tsignRegex := regexp.MustCompile(`\"sign\":\"([^\"]+)\"`)\n\tshaRegex := regexp.MustCompile(`\"sha\":\"([a-f0-9]{64})\"`)\n\thashRegex := regexp.MustCompile(`\"hash\",\"([^\"]+)\"`)\n\t\n\tsignMatch := signRegex.FindStringSubmatch(string(body))\n\tshaMatch := shaRegex.FindStringSubmatch(string(body))\n\thashMatch := hashRegex.FindStringSubmatch(string(body))\n\t\n\tif len(signMatch) < 2 || len(shaMatch) < 2 || len(hashMatch) < 2 {\n\t\treturn nil, fmt.Errorf(\"提取凭证失败\")\n\t}\n\t\n\treturn &Credentials{\n\t\tSign: signMatch[1],\n\t\tSha:  shaMatch[1],\n\t\tHash: hashMatch[1],\n\t}, nil\n}\n\n// getSearchResults 获取搜索结果列表\nfunc (p *PanyqPlugin) getSearchResults(sign string, pageNum int, client *http.Client) ([]SearchHit, int, error) {\n\t// 构建URL\n\tsearchURL := fmt.Sprintf(\"%s/api/search?sign=%s&page=%d\", BaseURL, sign, pageNum)\n\t\n\t// 创建请求\n\treq, err := http.NewRequest(\"GET\", searchURL, nil)\n\tif err != nil {\n\t\treturn nil, 0, err","sourceCodeStart":964,"sourceCodeEnd":1000,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/panyq/panyq.go#L964-L1000","documentation":"Extraction failure in PanyqPlugin.getCredentials (plugin/panyq/panyq.go:982): the page body was fetched but none of the sign/sha/hash regexes matched, so the anti-bot credentials cannot be assembled. Usually means the site changed its page structure or served a challenge.","triggerScenarios":"Thrown at plugin/panyq/panyq.go:982 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["记录页面快照核对正则是否失效","更新正则以匹配站点新结构","失败时刷新会话后重试一次"],"exampleFix":null,"handlingStrategy":"fallback","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"}