{"record":{"id":"c5e26b55bb89f764","repo":"fish2018/pansou","slug":"s-w-c5e26b","errorCode":null,"errorMessage":"[%s] 搜索请求失败: %w","messagePattern":"\\[(.+?)\\] 搜索请求失败: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/gaoqing888/gaoqing888.go","lineNumber":143,"sourceCode":"\t\t\t\tChannel:  \"\",\n\t\t\t\tDatetime: time.Now(),\n\t\t\t}\n\n\t\t\tmu.Lock()\n\t\t\tresults = append(results, result)\n\t\t\tmu.Unlock()\n\t\t}(item)\n\t}\n\n\twg.Wait()\n\treturn plugin.FilterResultsByKeyword(results, keyword), nil\n}\n\nfunc (p *Gaoqing888Plugin) fetchSearchResults(client *http.Client, keyword string) ([]articleItem, error) {\n\trequestURL := fmt.Sprintf(searchURL, url.QueryEscape(keyword))\n\tdoc, err := fetchDocument(client, requestURL, searchTimeout, baseURL+\"/\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"[%s] 搜索请求失败: %w\", p.Name(), err)\n\t}\n\n\titems := make([]articleItem, 0)\n\tdoc.Find(\"div.wp-list.search-list div.video-row\").Each(func(_ int, s *goquery.Selection) {\n\t\ttitleLink := s.Find(\"a.title-link\").First()\n\t\ttitle := cleanText(titleLink.Text())\n\t\tdetailURL, ok := titleLink.Attr(\"href\")\n\t\tif !ok || title == \"\" || detailURL == \"\" {\n\t\t\treturn\n\t\t}\n\n\t\tid := extractDetailID(detailURL)\n\t\tif id == \"\" {\n\t\t\treturn\n\t\t}\n\n\t\timageURL := strings.TrimSpace(s.Find(\"a.cover-link img.cover\").AttrOr(\"src\", \"\"))\n\t\tcontent := cleanText(strings.Join([]string{","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/gaoqing888/gaoqing888.go#L125-L161","documentation":"The gaoqing888 plugin could not fetch/parse the search page document: fetchDocument (which performs the HTTP request with retries and loads it via goquery) returned an error. The plugin surfaces it wrapped with its plugin name, aborting the search.","triggerScenarios":"fetchSearchResults: fetchDocument(client, requestURL, searchTimeout, baseURL+\"/\") failed — i.e. the HTTP GET to the search URL failed or the response could not be parsed into a document.","commonSituations":"Site down or unreachable, searchTimeout too short on slow connections, site blocks the client (403/captcha), DNS or proxy misconfiguration.","solutions":["Check connectivity to the gaoqing888 site (curl the searchURL).","Inspect the wrapped fetchDocument error: 'HTTP %d' means server-side, transport error means network/DNS/proxy.","Increase searchTimeout if the site responds slowly.","Refresh cookies/User-Agent if the site enforces anti-bot checks."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// check reachability before invoking the plugin\nresp, err := client.Head(baseURL)\nif err != nil || resp.StatusCode >= 400 {\n    log.Printf(\"gaoqing888 site unreachable (err=%v status=%d)\", err, statusOf(resp))\n}","typeGuard":null,"tryCatchPattern":"results, err := plugin.Search(keyword)\nif err != nil {\n    if strings.Contains(err.Error(), \"搜索请求失败\") {\n        log.Printf(\"gaoqing888 fetch failed: %v\", err)\n        return fallbackToOtherPlugins(keyword)\n    }\n    return err\n}","preventionTips":["Set timeouts comfortably above the site's typical response time","Send realistic browser headers to reduce blocking","Health-check the site before scheduling searches","Fall back to other search plugins when this one is down"],"tags":["http","web-scraping","go","timeout"],"backgroundTag":"http-request-failed","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"}