fish2018/pansou · error
无法从首页提取search2参数
Error message
无法从首页提取search2参数
What it means
Extraction sentinel in u3c3 getSearch2Parameter: a mirror's homepage was fetched (HTTP 200, body read fine) but extractSearch2FromHTML found no search2 value in the HTML. Set as lastErr and the loop moves to the next domain; fatal only when all domains fail. Indicates the page template or obfuscation changed, or a challenge page was served.
Solutions
- Update the extraction regex/logic for the new homepage structure
- Verify the served page isn't a captcha/block page
- Add new mirror domains to try
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at plugin/u3c3/u3c3.go:183 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/b003116a978be8bb.
Report an issue: GitHub.
Appendix: source
Thrown at plugin/u3c3/u3c3.go:183
if i < MaxRetries-1 {
time.Sleep(RetryDelay)
}
}
if lastErr != nil || resp == nil || resp.StatusCode != 200 {
continue
}
body, readErr := io.ReadAll(resp.Body)
resp.Body.Close()
if readErr != nil {
lastErr = readErr
continue
}
search2 = p.extractSearch2FromHTML(string(body))
if search2 != "" {
p.setActiveURL(baseURL)
break
}
lastErr = fmt.Errorf("无法从首页提取search2参数")
}
if search2 == "" {
if lastErr == nil {
lastErr = fmt.Errorf("u3c3 所有域名均不可用")
}
return "", lastErr
}
// 缓存参数
p.search2 = search2
p.lastSync = time.Now()
if p.debugMode {
log.Printf("[U3C3] 获取到search2参数: %s", search2)
}
return search2, nil
}View on GitHub (pinned to beaa561337)