AlistGo/alist · error

not find file page param

Error message

not find file page param

What it means

Thrown by the lanzou (Lanzou Cloud) driver when resolving a share link for a file that does not require a password. The driver fetches the share page HTML and expects to find an <iframe src="..."> element (regex findDownPageParamReg, drivers/lanzou/util.go:309) that points to the second-level download page. If the regex does not match exactly one capture group, the driver cannot build the next request URL and aborts with this error.

Source

Thrown at drivers/lanzou/util.go:417

		if len(fileIDs) > 1 {
			fileID = fileIDs[1]
		} else {
			return nil, fmt.Errorf("not find file id")
		}
		var resp FileShareInfoAndUrlResp[string]
		_, err = d.post(d.ShareUrl+"/ajaxm.php?file="+fileID, func(req *resty.Request) { req.SetFormData(param) }, &resp)
		if err != nil {
			return nil, err
		}
		file.NameAll = resp.Inf
		file.Pwd = pwd
		baseUrl = resp.GetBaseUrl()
		downloadUrl = resp.GetDownloadUrl()
	} else {
		urlpaths := findDownPageParamReg.FindStringSubmatch(sharePageData)
		if len(urlpaths) != 2 {
			log.Errorf("lanzou: err => not find file page param ,data => %s\n", sharePageData)
			return nil, fmt.Errorf("not find file page param")
		}
		nextPageData, err := d.getHtml(fmt.Sprint(d.ShareUrl, urlpaths[1]), nil)
		if err != nil {
			return nil, err
		}
		param, err = htmlJsonToMap(nextPageData)
		if err != nil {
			return nil, err
		}

		fileIDs := findFileIDReg.FindStringSubmatch(nextPageData)
		var fileID string
		if len(fileIDs) > 1 {
			fileID = fileIDs[1]
		} else {
			return nil, fmt.Errorf("not find file id")
		}
		var resp FileShareInfoAndUrlResp[int]

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Verify the share link still opens in a browser and shows the download iframe; if the file was removed, refresh the link.
  2. Check upstream OpenList/AList releases for a lanzou driver fix after a markup change and update the driver.
  3. Confirm the configured ShareUrl/addition settings match the domain the link belongs to.
  4. If rate-limited, wait and retry from a different IP or reduce request frequency.

Example fix

// before: link deleted, lanzou changed HTML -> error at runtime
// after: keep driver updated and validate the share first
if err := d.Link(ctx, shareObj, args); err != nil {
    if strings.Contains(err.Error(), "not find file page param") {
        // share is dead or page markup changed: surface a clear message
        return nil, errors.New("lanzou share unavailable or page layout changed")
    }
}
Defensive patterns

Strategy: retry

Validate before calling

// Pre-flight: fetch the share page and confirm the download iframe exists
html, err := getHtml(shareURL, nil)
if err == nil {
    if len(regexp.MustCompile(`<iframe.*?src="(.+?)"`).FindStringSubmatch(html)) != 2 {
        return errors.New("share page has no download iframe; do not call Link")
    }
}

Try / catch

// In Go callers of Link():
if _, err := d.Link(ctx, obj, args); err != nil {
    if strings.Contains(err.Error(), "not find file page param") {
        // treat as dead share / layout change: report, do not retry immediately
        return handleDeadShare(obj)
    }
    return err
}

Prevention

When it happens

Trigger: Calling the link-resolution path (GetRawLink / down_h5 flow) on a password-free lanzou share whose HTML no longer contains an iframe tag of the expected shape: deleted files, share links that were taken down, lanzou HTML template changes, or an anti-bot/verification page returned instead of the real share page.

Common situations: Lanzou periodically changes its share-page markup, breaking the scraper; the share was deleted or reported; the account hit rate limits and the CDN returned an interstitial page; using a ShareUrl domain that serves a different page variant (e.g. lanzoux/lanzouxz mirrors).

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/063f4a7d94df79a4. Report an issue: GitHub.