fish2018/pansou · error

[ ] 获取网盘链接失败

Error message

[%s] 获取网盘链接失败: %w

What it means

Terminal wrapper in ting77 searchImpl: resolveEntries produced zero results and at least one entry resolution failed (resolveErr != nil). Means every candidate link either failed to resolve or was filtered; the last resolution error explains why.

Solutions

  1. Inspect resolveErr (rate limit, invalid redirect, unsupported link)
  2. Retry with lower concurrency to avoid 429s
  3. If all links unsupported, the site's link scheme changed
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at plugin/ting77/ting77.go:99 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/5e8b039867ae3fb6. Report an issue: GitHub.

Appendix: source

Thrown at plugin/ting77/ting77.go:99

	if err != nil {
		return nil, fmt.Errorf("[%s] 搜索请求失败: %w", p.Name(), err)
	}
	defer resp.Body.Close()
	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("[%s] 搜索页面返回状态码: %d", p.Name(), resp.StatusCode)
	}
	doc, err := goquery.NewDocumentFromReader(io.LimitReader(resp.Body, maxResponseBytes))
	if err != nil {
		return nil, fmt.Errorf("[%s] 解析搜索页面失败: %w", p.Name(), err)
	}
	entries := parseSearchEntries(doc)
	if len(entries) == 0 {
		return nil, nil
	}

	results, resolveErr := p.resolveEntries(ctx, client, entries)
	if len(results) == 0 && resolveErr != nil {
		return nil, fmt.Errorf("[%s] 获取网盘链接失败: %w", p.Name(), resolveErr)
	}
	return plugin.FilterResultsByKeyword(results, keyword), nil
}

type searchEntry struct {
	ID          string
	Title       string
	Description string
	Size        string
	Tags        []string
	CloudTypes  []string
	Datetime    time.Time
}

func parseSearchEntries(doc *goquery.Document) []searchEntry {
	entries := make([]searchEntry, 0, 20)
	doc.Find("a.resource-row").Each(func(_ int, selection *goquery.Selection) {
		href, _ := selection.Attr("href")

View on GitHub (pinned to beaa561337)