fish2018/pansou · error

盘链列表接口异常

Error message

盘链列表接口异常: %s

What it means

When the panlian /api/get_videos.php response returns a Code other than 1 (and it is not the login case), the plugin rejects it with '盘链列表接口异常: <Msg>' ('panlian list API abnormal'). It means the API responded but with an unexpected business-level failure code.

Solutions

  1. Read the Msg included in the error to identify the upstream-reported cause.
  2. Retry later if the message indicates server-side trouble/maintenance.
  3. Check your panlian account status (ban/quota) on the site.
  4. Update the plugin if panlian changed its API response codes.

Example fix

// before
resp, err := fetchVideos(kw) // 盘链列表接口异常: 服务繁忙
// after
resp, err := fetchVideos(kw)
if err != nil && strings.Contains(err.Error(), "服务繁忙") {
    time.Sleep(retryBackoff); resp, err = fetchVideos(kw)
}
Defensive patterns

Strategy: retry

Validate before calling

// normalize keyword before the API call
kw = strings.TrimSpace(keyword)
if kw == "" || len([]rune(kw)) > 100 {
    return fmt.Errorf("invalid keyword %q for panlian search", keyword)
}

Try / catch

resp, err := plugin.SearchVideos(ctx, keyword)
if err != nil && strings.Contains(err.Error(), "盘链列表接口异常") {
    select {
    case <-time.After(backoff):
        resp, err = plugin.SearchVideos(ctx, keyword) // retry once
    }
}

Prevention

When it happens

Trigger: Upstream returns Code != 1: keyword rejected, account quota/ban, server-side error, API version mismatch, or empty/no-results encoded as a failure code.

Common situations: Searching during panlian maintenance windows; account restricted for abuse; panlian upgraded its API and changed success semantics; unusual keywords triggering server-side filters.

Related errors


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

Appendix: source

Thrown at plugin/panlian/panlian.go:825

	}

	return links, strings.Join(summaryParts, " / "), latest, truncated
}

func (p *PanlianPlugin) fetchVideos(client *http.Client, cookie string, keyword string) (*VideoSearchResponse, error) {
	values := url.Values{}
	values.Set("wd", keyword)
	values.Set("pg", "1")

	var resp VideoSearchResponse
	if err := p.doJSONGET(client, cookie, "/api/get_videos.php", values, &resp); err != nil {
		return nil, err
	}
	if resp.Code == -1 && strings.Contains(resp.Msg, "登录") {
		return nil, fmt.Errorf("%w: %s", errLoginRequired, resp.Msg)
	}
	if resp.Code != 1 {
		return nil, fmt.Errorf("盘链列表接口异常: %s", resp.Msg)
	}
	return &resp, nil
}

func (p *PanlianPlugin) fetchPanLinks(client *http.Client, cookie string, keyword string, vodID int) (*PanLinkResponse, error) {
	values := url.Values{}
	values.Set("keyword", keyword)
	values.Set("vod_id", fmt.Sprintf("%d", vodID))
	values.Set("_t", fmt.Sprintf("%d", time.Now().UnixMilli()))

	var resp PanLinkResponse
	if err := p.doJSONGET(client, cookie, "/api/search_pan_links.php", values, &resp); err != nil {
		return nil, err
	}
	if !resp.Success && strings.Contains(resp.Message, "登录") {
		return nil, fmt.Errorf("%w: %s", errLoginRequired, resp.Message)
	}
	if !resp.Success {

View on GitHub (pinned to beaa561337)