{"record":{"id":"063f4a7d94df79a4","repo":"AlistGo/alist","slug":"not-find-file-page-param","errorCode":null,"errorMessage":"not find file page param","messagePattern":"not find file page param","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/lanzou/util.go","lineNumber":417,"sourceCode":"\t\tif len(fileIDs) > 1 {\n\t\t\tfileID = fileIDs[1]\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"not find file id\")\n\t\t}\n\t\tvar resp FileShareInfoAndUrlResp[string]\n\t\t_, err = d.post(d.ShareUrl+\"/ajaxm.php?file=\"+fileID, func(req *resty.Request) { req.SetFormData(param) }, &resp)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfile.NameAll = resp.Inf\n\t\tfile.Pwd = pwd\n\t\tbaseUrl = resp.GetBaseUrl()\n\t\tdownloadUrl = resp.GetDownloadUrl()\n\t} else {\n\t\turlpaths := findDownPageParamReg.FindStringSubmatch(sharePageData)\n\t\tif len(urlpaths) != 2 {\n\t\t\tlog.Errorf(\"lanzou: err => not find file page param ,data => %s\\n\", sharePageData)\n\t\t\treturn nil, fmt.Errorf(\"not find file page param\")\n\t\t}\n\t\tnextPageData, err := d.getHtml(fmt.Sprint(d.ShareUrl, urlpaths[1]), nil)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tparam, err = htmlJsonToMap(nextPageData)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tfileIDs := findFileIDReg.FindStringSubmatch(nextPageData)\n\t\tvar fileID string\n\t\tif len(fileIDs) > 1 {\n\t\t\tfileID = fileIDs[1]\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"not find file id\")\n\t\t}\n\t\tvar resp FileShareInfoAndUrlResp[int]","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/lanzou/util.go#L399-L435","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Verify the share link still opens in a browser and shows the download iframe; if the file was removed, refresh the link.","Check upstream OpenList/AList releases for a lanzou driver fix after a markup change and update the driver.","Confirm the configured ShareUrl/addition settings match the domain the link belongs to.","If rate-limited, wait and retry from a different IP or reduce request frequency."],"exampleFix":"// before: link deleted, lanzou changed HTML -> error at runtime\n// after: keep driver updated and validate the share first\nif err := d.Link(ctx, shareObj, args); err != nil {\n    if strings.Contains(err.Error(), \"not find file page param\") {\n        // share is dead or page markup changed: surface a clear message\n        return nil, errors.New(\"lanzou share unavailable or page layout changed\")\n    }\n}","handlingStrategy":"retry","validationCode":"// Pre-flight: fetch the share page and confirm the download iframe exists\nhtml, err := getHtml(shareURL, nil)\nif err == nil {\n    if len(regexp.MustCompile(`<iframe.*?src=\"(.+?)\"`).FindStringSubmatch(html)) != 2 {\n        return errors.New(\"share page has no download iframe; do not call Link\")\n    }\n}","typeGuard":null,"tryCatchPattern":"// In Go callers of Link():\nif _, err := d.Link(ctx, obj, args); err != nil {\n    if strings.Contains(err.Error(), \"not find file page param\") {\n        // treat as dead share / layout change: report, do not retry immediately\n        return handleDeadShare(obj)\n    }\n    return err\n}","preventionTips":["Keep the lanzou driver updated; check release notes after lanzou site changes.","Test share links in a browser before wiring them into automation.","Log the sharePageData snippet when this fires to distinguish markup change from dead link."],"tags":["lanzou","web-scraping","regex","share-link","go"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}