{"record":{"id":"71558831a779c696","repo":"fish2018/pansou","slug":"error-715588","errorCode":null,"errorMessage":"未找到滑动验证脚本","messagePattern":"未找到滑动验证脚本","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/qiwei/qiwei.go","lineNumber":354,"sourceCode":"\t\t}\n\n\t\tp.detailCache.Store(detailURL, detailCacheEntry{Info: info, CachedAt: time.Now()})\n\t\treturn info, nil\n\t}\n\n\tif lastErr == nil {\n\t\tlastErr = fmt.Errorf(\"[%s] 获取详情失败: %s\", p.Name(), detailURL)\n\t}\n\treturn detailInfo{}, lastErr\n}\n\n// solveVerification completes the site's deterministic slider challenge. The\n// challenge is session-bound, so the caller and this method must share a\n// cookie jar on the same http.Client.\nfunc (p *QiweiPlugin) solveVerification(client *http.Client, pageURL, verifyHTML string) error {\n\tscriptMatch := verificationScriptRegex.FindStringSubmatch(verifyHTML)\n\tif len(scriptMatch) < 2 {\n\t\treturn fmt.Errorf(\"未找到滑动验证脚本\")\n\t}\n\tscriptURL := normalizeURL(pageURL, scriptMatch[1])\n\tjsBody, err := p.fetchBody(client, scriptURL, pageURL, detailTimeout)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"获取验证脚本失败: %w\", err)\n\t}\n\n\ttypeMatch := verificationTypeRegex.FindStringSubmatch(jsBody)\n\tkeyMatch := verificationKeyRegex.FindStringSubmatch(jsBody)\n\tvalueMatch := verificationValueRegex.FindStringSubmatch(jsBody)\n\tif len(typeMatch) < 2 || len(keyMatch) < 2 || len(valueMatch) < 2 {\n\t\treturn fmt.Errorf(\"验证脚本参数不完整\")\n\t}\n\n\tencodedValue := md5StringToHex(valueMatch[1])\n\tendpointPath := \"/a20be899_96a6_40b2_88ba_32f1f75f1552_yanzheng_huadong.php\"\n\tif endpointMatch := verificationEndpointRegex.FindStringSubmatch(jsBody); len(endpointMatch) > 1 {\n\t\tendpointPath = \"/\" + endpointMatch[1]","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/qiwei/qiwei.go#L336-L372","documentation":"solveVerification parses the verification page HTML for the slider-challenge script via verificationScriptRegex. When no script tag/URL in the HTML matches the regex, it returns this error, aborting the automated verification solve for that page. The caller (getDetailInfo or searchSuggest) then records the failure and moves to the next candidate URL.","triggerScenarios":"isVerifyPage classified the response as a verification page, but verificationScriptRegex.FindStringSubmatch(verifyHTML) returned fewer than 2 groups — i.e. the HTML contains no script URL matching the expected pattern.","commonSituations":"The site updated its verification page and now embeds the script differently (inline JS, different tag, renamed bundle); a CDN/edge served a generic challenge page not matching the plugin's assumptions; the response is actually an error/interstitial page misclassified by isVerifyPage.","solutions":["Fetch the verification page manually (browser DevTools or curl) and compare its script tags against verificationScriptRegex; update the regex to the new markup.","Check whether the site now serves a different challenge type entirely — if so the slider solver needs rework, not just the regex.","Confirm isVerifyPage isn't a false positive: if the page isn't really a verification page, tighten its detection to avoid entering solveVerification needlessly.","Add the captured HTML to a test fixture and pin verificationScriptRegex behavior against it to catch future site changes."],"exampleFix":"// before\nscriptMatch := verificationScriptRegex.FindStringSubmatch(verifyHTML)\nif len(scriptMatch) < 2 {\n    return fmt.Errorf(\"未找到滑动验证脚本\")\n}\n// after\nscriptMatch := verificationScriptRegex.FindStringSubmatch(verifyHTML)\nif len(scriptMatch) < 2 {\n    return fmt.Errorf(\"未找到滑动验证脚本 (pageURL=%s, htmlLen=%d)\", pageURL, len(verifyHTML)) // aid diagnosis\n}","handlingStrategy":"type-guard","validationCode":"// pre-check the page for the expected script marker before attempting a solve\nif isVerifyPage(body) && !verificationScriptRegex.MatchString(body) {\n    return errors.New(\"verification page lacks expected slider script; site markup likely changed\")\n}","typeGuard":"func hasVerificationScript(html string) bool {\n    return verificationScriptRegex.MatchString(html)\n}","tryCatchPattern":"if err := plugin.SolveVerification(client, pageURL, body); err != nil {\n    if strings.Contains(err.Error(), \"未找到滑动验证脚本\") {\n        // site markup drift: log body snapshot for regex maintenance, skip candidate\n        saveDebugHTML(pageURL, body)\n        return errSkipCandidate\n    }\n    return err\n}","preventionTips":["Pin verificationScriptRegex against stored fixtures of the real verification page and refresh them periodically.","Save the raw HTML when this error occurs so regex updates are data-driven.","Keep isVerifyPage strict to avoid running the solver on non-verification pages.","Set an alert when this error rate rises — it almost always means a site-side markup change."],"tags":["captcha","regex","html-parsing","verification"],"backgroundTag":"unexpected-response-shape","analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}