fish2018/pansou · error

站点未接受验证参数

Error message

站点未接受验证参数

What it means

After submitting the verification parameters, the plugin re-checks the response with isVerifyPage. If the response still looks like a challenge page, the site did not accept the computed type/key/value and this error is returned. It means the solver's derived parameters were wrong or stale.

Solutions

  1. Ensure the http.Client shares a cookie jar across the page fetch and verification (challenge is session-bound per the source comment)
  2. Re-derive md5StringToHex against the current JS to confirm the encoding algorithm is unchanged
  3. Clear caches and refetch the fresh challenge JS before solving
  4. Check whether verificationEndpointRegex resolved the correct endpoint path
Defensive patterns

Strategy: fallback

Validate before calling

// Ensure the client carries a cookie jar so the session-bound challenge links up
jar, _ := cookiejar.New(nil)
client := &http.Client{Jar: jar, Timeout: 30 * time.Second}
plugin := NewQiweiPlugin(client)

Try / catch

info, err := plugin.GetDetailInfo(ctx, url)
if err != nil && strings.Contains(err.Error(), "站点未接受验证参数") {
    log.Printf("challenge rejected for %s; solver likely outdated", url)
    return cachedOrEmptyInfo
}

Prevention

When it happens

Trigger: isVerifyPage(string(responseBody)) is true after POSTing the solved parameters in solveVerification — the MD5-of-shifted-runes computation, key/type extraction, or session cookies did not satisfy the challenge.

Common situations: Site rotated its challenge algorithm (md5StringToHex no longer matches); the http.Client lacks the cookie jar so the session-bound challenge is not linked; the endpoint path regex matched a stale path; cached/old JS served.

Related errors


AI-assisted analysis of fish2018/pansou@beaa561337 (2026-09-07). Data as JSON: /api/errors/a82d40da3b1e8389. Report an issue: GitHub.

Appendix: source

Thrown at plugin/qiwei/qiwei.go:403

	ctx, cancel := context.WithTimeout(context.Background(), detailTimeout)
	defer cancel()
	req, err := http.NewRequestWithContext(ctx, http.MethodGet, verifyURL, nil)
	if err != nil {
		return fmt.Errorf("创建验证请求失败: %w", err)
	}
	p.setHeaders(req, pageURL)
	req.Header.Set("X-Requested-With", "XMLHttpRequest")
	resp, err := p.doRequestWithRetry(req, client)
	if err != nil {
		return fmt.Errorf("提交验证失败: %w", err)
	}
	defer resp.Body.Close()
	responseBody, err := io.ReadAll(resp.Body)
	if err != nil {
		return fmt.Errorf("读取验证响应失败: %w", err)
	}
	if isVerifyPage(string(responseBody)) {
		return fmt.Errorf("站点未接受验证参数")
	}
	return nil
}

func md5StringToHex(value string) string {
	var builder strings.Builder
	for _, r := range value {
		builder.WriteString(fmt.Sprintf("%d", r+1))
	}
	sum := md5.Sum([]byte(builder.String()))
	return hex.EncodeToString(sum[:])
}

func (p *QiweiPlugin) parseDetail(detailURL, body, fallbackTitle, fallbackPic string) (detailInfo, error) {
	doc, err := goquery.NewDocumentFromReader(strings.NewReader(body))
	if err != nil {
		return detailInfo{}, fmt.Errorf("[%s] 解析详情页失败: %w", p.Name(), err)
	}

View on GitHub (pinned to beaa561337)