fish2018/pansou · warning
[ ] 未能抓取到有效网盘链接
Error message
[%s] 未能抓取到有效网盘链接
What it means
After concurrently fetching each thread's detail page, searchImpl fails with '[%s] 未能抓取到有效网盘链接' when no worker extracted any valid pan (net-disk) links. All detail fetches either failed or the pages contained no recognizable share links.
Solutions
- Check one thread detail page in a browser to confirm whether share links are still present and guest-visible
- Add/refresh cookies or authentication so detail pages return real links instead of placeholders
- Slow the workers (lower detailWorkerCount) or add retries to avoid anti-bot rate limiting
- Update the link-extraction patterns if the forum changed how pan links are rendered
- Verify network/proxy health so detail requests are not all failing
Example fix
// before
sem = make(chan struct{}, detailWorkerCount)
// after
sem = make(chan struct{}, 2) // reduce concurrency to avoid anti-bot blocks on detail pages Defensive patterns
Strategy: retry
Validate before calling
// cannot pre-validate; guard after the call
if err != nil && strings.Contains(err.Error(), "未能抓取到有效网盘链接") { /* retry or fallback */ } Type guard
func isNoLinksErr(err error) bool { return err != nil && strings.Contains(err.Error(), "未能抓取到有效网盘链接") } Try / catch
results, err := plugin.Search(ctx, keyword)
if isNoLinksErr(err) {
// retry once with lower concurrency / fresh cookies, else fall back to another plugin
time.Sleep(time.Second)
results, err = plugin.Search(ctx, keyword)
}
if err != nil { return err } Prevention
- Throttle detailWorkerCount to avoid tripping anti-bot rate limits on detail pages
- Keep valid session cookies so share links are rendered for your requests
- Retry transient detail fetch failures per-thread before giving up entirely
- Alert on this error spiking — it usually means the forum changed link markup or deleted posts
When it happens
Trigger: Every fetched thread detail contains no valid cloud-drive links — posts were deleted/link-stripped, detail pages require login, anti-bot blocks the detail requests, or the link-extraction regex no longer matches the page markup.
Common situations: Forum purges or hides share links for old posts; guests see link placeholders instead of real URLs; detail request rate-limited so all workers get challenge pages; site changed its link format so extraction returns nothing.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
AI-assisted analysis of fish2018/pansou@beaa561337 (2026-09-07).
Data as JSON: /api/errors/a5b3196a02fadb22.
Report an issue: GitHub.
Appendix: source
Thrown at plugin/yiove/yiove.go:183
Links: limitLinks(linksWithTitle, detailLinkLimit),
Tags: mergeTags(thread.Tags, detail.tags),
Channel: "",
Datetime: detail.datetime,
}
resultM.Lock()
results = append(results, result)
resultM.Unlock()
logDebug(debug, "[%s] 详情抓取成功 URL=%s 链接数=%d", p.Name(), thread.URL, len(result.Links))
}()
}
wg.Wait()
if len(results) == 0 {
logDebug(debug, "[%s] 所有线程抓取完成但无有效链接", p.Name())
return nil, fmt.Errorf("[%s] 未能抓取到有效网盘链接", p.Name())
}
filtered := plugin.FilterResultsByKeyword(results, searchKeyword)
logDebug(debug, "[%s] 过滤后结果数=%d", p.Name(), len(filtered))
for idx, res := range filtered {
linkSummaries := make([]string, 0, len(res.Links))
for _, link := range res.Links {
linkSummaries = append(linkSummaries, fmt.Sprintf("%s(%s)", link.Type, link.URL))
}
logDebug(
debug,
"[%s] Result#%d | UID=%s | Title=%s | Links=%d | LinkDetail=%v",
p.Name(),
idx,
res.UniqueID,
res.Title,
len(res.Links),
linkSummaries,View on GitHub (pinned to beaa561337)