fish2018/pansou · error
解析PoW验证数据失败
Error message
解析PoW验证数据失败: %w
What it means
Wrapped decode error in solveRemotePowChallenge (plugin/gying/gying.go:1695): the PoW endpoint returned 200 but the body did not unmarshal into ChallengePageData — usually an HTML interstitial or unexpected payload instead of the JSON challenge.
Solutions
- 记录原始响应体确认实际返回内容
- 对照站点结构更新 ChallengePageData 字段
- 在解析前先嗅探是否为 HTML
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at plugin/gying/gying.go:1695 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of fish2018/pansou@beaa561337 (2026-09-07).
Data as JSON: /api/errors/9e604142cc60bd22.
Report an issue: GitHub.
Appendix: source
Thrown at plugin/gying/gying.go:1695
if err != nil {
return err
}
if DebugLog {
fmt.Printf("[Gying] Remote PoW Challenge命中: url=%s powURL=%s\n", requestURL, powURL)
}
body, statusCode, _, err := p.requestWithChallengeRetry(scraper, http.MethodGet, powURL, "", "")
if err != nil {
return fmt.Errorf("获取PoW验证数据失败: %w", err)
}
if statusCode != http.StatusOK {
return fmt.Errorf("获取PoW验证数据失败: HTTP %d", statusCode)
}
var challenge ChallengePageData
if err := json.Unmarshal(body, &challenge); err != nil {
return fmt.Errorf("解析PoW验证数据失败: %w", err)
}
if challenge.N == "" || challenge.X == "" || challenge.T <= 0 {
return fmt.Errorf("PoW验证数据无效")
}
y, err := p.computePowResult(&challenge)
if err != nil {
return err
}
form := url.Values{}
form.Set("y", y)
return p.submitChallengeVerification(scraper, powURL, form)
}
func (p *GyingPlugin) buildPowURL(requestURL string) (string, error) {
parsedURL, err := url.Parse(requestURL)View on GitHub (pinned to beaa561337)