jackwener/OpenCLI · error · CommandExecutionError
Google Scholar result cards were present but no rows could…
Error message
Google Scholar result cards were present but no rows could be extracted
What it means
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.
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.
Example fix
// before opencli run google-scholar search "rare citation-only author name" // after opencli run google-scholar search "author name paper title keyword" // query with linked results
Defensive patterns
Strategy: fallback
Try / catch
try {
rows = await run('google-scholar search', query);
} catch (e) {
if (/no rows could be extracted/.test(e.message)) {
rows = await fallbackSearch(query); // e.g. Semantic Scholar / Crossref
} else throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- google-scholar/search
- No papers found for
- 1point3acres thread
- 1point3acres user
- amazon did not expose any ranked items
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/4865c26a2c78af8c.
Report an issue: GitHub.
Appendix: source
Thrown at clis/google-scholar/search.js:67
rank: results.length + 1,
title,
authors: authors.slice(0, 80),
source: source.slice(0, 60),
year,
cited,
url,
});
if (results.length >= ${limit}) break;
}
return { items: results, resultCount: resultCards.length };
})()
`);
if (!wrapper || typeof wrapper !== 'object' || !Array.isArray(wrapper.items)) {
throw new CommandExecutionError('Google Scholar search returned an unexpected payload shape');
}
if (wrapper.items.length === 0) {
if (Number(wrapper.resultCount) > 0) {
throw new CommandExecutionError('Google Scholar result cards were present but no rows could be extracted');
}
throw new EmptyResultError('google-scholar/search', 'Try a different query or check whether Google Scholar returned a CAPTCHA.');
}
return wrapper.items;
},
});
View on GitHub (pinned to 49907e53dc)