{"record":{"id":"aa4ed92c04695f2d","repo":"fish2018/pansou","slug":"s-aa4ed9","errorCode":null,"errorMessage":"[%s] 未能获取到有效网盘链接","messagePattern":"\\[(.+?)\\] 未能获取到有效网盘链接","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/jsnoteclub/jsnoteclub.go","lineNumber":183,"sourceCode":"\t\t\t\tUniqueID: fmt.Sprintf(\"%s-%s\", p.Name(), post.ID),\n\t\t\t\tTitle:    strings.TrimSpace(post.Title),\n\t\t\t\tContent:  strings.TrimSpace(post.Excerpt),\n\t\t\t\tLinks:    links,\n\t\t\t\tTags:     []string{strings.TrimSpace(post.Slug)},\n\t\t\t\tChannel:  \"\",\n\t\t\t\tDatetime: post.updatedAtTime(),\n\t\t\t}\n\n\t\t\tresultM.Lock()\n\t\t\tresults = append(results, result)\n\t\t\tresultM.Unlock()\n\t\t}()\n\t}\n\n\twg.Wait()\n\n\tif len(results) == 0 {\n\t\treturn nil, fmt.Errorf(\"[%s] 未能获取到有效网盘链接\", p.Name())\n\t}\n\n\treturn plugin.FilterResultsByKeyword(results, searchKeyword), nil\n}\n\nfunc (p *JsNoteClubPlugin) getAllPosts(client *http.Client) ([]ghostPost, error) {\n\tnow := time.Now()\n\n\tpostsCache.RLock()\n\tif len(postsCache.entries) > 0 && now.Before(postsCache.expire) {\n\t\tdefer postsCache.RUnlock()\n\t\treturn postsCache.entries, nil\n\t}\n\tpostsCache.RUnlock()\n\n\tpostsCache.Lock()\n\tdefer postsCache.Unlock()\n","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/jsnoteclub/jsnoteclub.go#L165-L201","documentation":"searchImpl fetches candidate posts concurrently and extracts net-disk links from each; if no goroutine produced any valid result, it returns \"[jsnoteclub] 未能获取到有效网盘链接\" (failed to obtain valid net-disk links).","triggerScenarios":"wg.Wait() completes and results is empty: every matched post's detail fetch/parse failed or contained no usable pan-link (per-goroutine errors are swallowed by the worker closures).","commonSituations":"jsnoteclub.com changed its post HTML so the link extractor no longer matches; posts were deleted or links expired; network failures in all detail-page fetches; keyword matched posts that never contained share links.","solutions":["Log per-post extraction errors inside the worker goroutines to see why results are empty","Update the detail-page parsing selectors to the current site HTML","Verify a matched post's detail page manually contains a net-disk link","Add retry/fallback fetch (different UA, cached page) before declaring failure"],"exampleFix":"// before\nwg.Wait()\nif len(results) == 0 {\n\treturn nil, fmt.Errorf(\"[%s] 未能获取到有效网盘链接\", p.Name())\n}\n\n// after\nwg.Wait()\nif len(results) == 0 {\n\tif lastExtractErr != nil {\n\t\treturn nil, fmt.Errorf(\"[%s] 未能获取到有效网盘链接: %w\", p.Name(), lastExtractErr)\n\t}\n\treturn nil, fmt.Errorf(\"[%s] 未能获取到有效网盘链接\", p.Name())\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Go\nresults, err := jnc.Search(ctx, keyword, ext)\nif err != nil && strings.Contains(err.Error(), \"未能获取到有效网盘链接\") {\n\tlog.Printf(\"jsnoteclub: extraction produced nothing (site layout changed?): %v\", err)\n\t// try next plugin\n}","preventionTips":["Collect and log per-post extraction errors instead of discarding them","Alert when the success rate of detail extraction drops to zero (layout change signal)","Add unit tests against saved HTML fixtures","Keep parser selectors updated with site changes"],"tags":["scraping","extraction","no-results"],"backgroundTag":"empty-result-set","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"}