{"record":{"id":"2dc7f030abe43b4e","repo":"fish2018/pansou","slug":"error-2dc7f0","errorCode":null,"errorMessage":"未找到搜索结果页面重定向信息","messagePattern":"未找到搜索结果页面重定向信息","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/xb6v/xb6v.go","lineNumber":267,"sourceCode":"\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 如果还是没找到，尝试查找简单的result/?searchid=格式\n\t\tif location == \"\" {\n\t\t\tre := regexp.MustCompile(`result/\\?searchid=\\d+`)\n\t\t\tmatch := re.FindString(bodyStr)\n\t\t\tif match != \"\" {\n\t\t\t\tlocation = match\n\t\t\t\tif p.debugMode {\n\t\t\t\t\tlog.Printf(\"[Xb6v] 从正则匹配中提取到Location: %s\", location)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif location == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"未找到搜索结果页面重定向信息\")\n\t\t}\n\t}\n\n\t// 构建完整的搜索结果URL\n\t// Location通常是类似 \"result/?searchid=39616\" 的格式，需要加上 /e/search/ 前缀\n\tvar resultURL string\n\tif strings.HasPrefix(location, \"result/\") {\n\t\tresultURL = p.currentBase + \"/e/search/\" + location\n\t} else {\n\t\tresultURL = p.currentBase + \"/\" + strings.TrimPrefix(location, \"/\")\n\t}\n\n\tif p.debugMode {\n\t\tlog.Printf(\"[Xb6v] 搜索结果页面: %s\", resultURL)\n\t}\n\n\t// 第二步：获取搜索结果页面\n\tresp2, err := p.doRequest(client, \"GET\", resultURL, \"\", p.currentBase)","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/xb6v/xb6v.go#L249-L285","documentation":"xb6v's search protocol relies on the search POST returning a redirect (Location header, JS location.href, meta refresh, or a result/?searchid=... URL). When no Location header is present, the plugin parses the body with three regex strategies; if none yields a redirect target, it throws this error, meaning the expected redirect flow was not followed.","triggerScenarios":"The POST to /e/search/index.php succeeds (HTTP response received) but contains no Location header and the body contains none of: location.href assignment, href/url= with searchid, or result/?searchid=N pattern — e.g. the site returned an error page, a captcha, a 'no results' page, or changed its redirect mechanism.","commonSituations":"The xb6v mirror changed its search backend and no longer emits searchid redirects; the search keyword was rejected and an error page was returned; the site is behind anti-bot protection serving a challenge page; site template update removed the JS/meta redirect.","solutions":["Try a different keyword; a rejected/empty search often produces a non-redirect error page.","Verify the configured mirror base URL is current — outdated mirrors commonly break the redirect flow.","Enable debug mode to dump the first 500 chars of the response body and confirm what the site actually returned (captcha/error page vs layout change).","Update the plugin's extraction regexes if the site changed its redirect format (e.g. new parameter name instead of searchid)."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// sanity-check keyword before searching\nkw := strings.TrimSpace(keyword)\nif kw == \"\" { return errors.New(\"keyword is empty\") }","typeGuard":null,"tryCatchPattern":"results, err := pluginSearch(keyword)\nif err != nil && strings.Contains(err.Error(), \"未找到搜索结果页面重定向信息\") {\n\t// treat as 'site flow changed or no results' — try alternate plugin/mirror\n\tresults, err = fallbackPlugin.Search(keyword)\n}","preventionTips":["Keep mirror base URLs up to date; test them periodically.","Retry with a simplified keyword when a search yields no redirect.","Monitor for site template changes if you depend on this plugin."],"tags":["http","scraping","missing-redirect","site-change"],"backgroundTag":"resource-not-found","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"}