{"record":{"id":"4865c26a2c78af8c","repo":"jackwener/OpenCLI","slug":"google-scholar-result-cards-were-present-but-no-ro","errorCode":null,"errorMessage":"Google Scholar result cards were present but no rows could be extracted","messagePattern":"Google Scholar result cards were present but no rows could be extracted","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/google-scholar/search.js","lineNumber":67,"sourceCode":"            rank: results.length + 1,\n            title,\n            authors: authors.slice(0, 80),\n            source: source.slice(0, 60),\n            year,\n            cited,\n            url,\n          });\n          if (results.length >= ${limit}) break;\n        }\n        return { items: results, resultCount: resultCards.length };\n      })()\n    `);\n        if (!wrapper || typeof wrapper !== 'object' || !Array.isArray(wrapper.items)) {\n            throw new CommandExecutionError('Google Scholar search returned an unexpected payload shape');\n        }\n        if (wrapper.items.length === 0) {\n            if (Number(wrapper.resultCount) > 0) {\n                throw new CommandExecutionError('Google Scholar result cards were present but no rows could be extracted');\n            }\n            throw new EmptyResultError('google-scholar/search', 'Try a different query or check whether Google Scholar returned a CAPTCHA.');\n        }\n        return wrapper.items;\n    },\n});\n","sourceCodeStart":49,"sourceCodeEnd":74,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/google-scholar/search.js#L49-L74","documentation":"The search page's result cards (`.gs_r.gs_or.gs_scl`) were found (`resultCount > 0`), but the per-card extraction produced zero rows — every card was skipped, which happens when each card lacks a title anchor (`.gs_rt a, h3 a`) with non-empty text. The command treats this as a hard error rather than an empty result, since visible results clearly existed.","triggerScenarios":"Calling `google-scholar search <query>` where Scholar returns result cards rendered as citation-only entries ([CITATION] entries without links), or a layout change removed `.gs_rt a` anchors, or the cards are present but still rendering their content when the script ran.","commonSituations":"Queries matching only 'CITATION' stub records on Scholar; mid-render evaluation on slow connections; Scholar A/B DOM changes; localized markup variations in zh-CN (`hl=zh-CN`) affecting the title selectors.","solutions":["Rephrase the query to target papers with linked titles rather than citation-only stubs.","Retry — if the page was mid-render, a re-run will usually extract rows.","Check scholar.google.com in a browser for the same query to see if results are citation-stubs; if markup changed, the command selectors need updating.","Catch the CommandExecutionError and treat as empty/no-results in your pipeline."],"exampleFix":"// before\nopencli run google-scholar search \"rare citation-only author name\"\n// after\nopencli run google-scholar search \"author name paper title keyword\"  // query with linked results","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  rows = await run('google-scholar search', query);\n} catch (e) {\n  if (/no rows could be extracted/.test(e.message)) {\n    rows = await fallbackSearch(query); // e.g. Semantic Scholar / Crossref\n  } else throw e;\n}","preventionTips":["Query topics with linked titles, not citation-only stub records.","Pin hl=en locale to keep selectors predictable.","Retry on first failure (mid-render evaluation).","Maintain a secondary scholarly search backend."],"tags":["scraping","dom-selector","google-scholar","empty-result"],"backgroundTag":"scraper-selector-mismatch","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}