jackwener/OpenCLI · error · CommandExecutionError
Could not load Google Scholar profile for: ${author}
Error message
Could not load Google Scholar profile for: ${author} What it means
After navigating to a Scholar profile page (directly by user ID or after clicking a profile link), the command scrapes `#gsc_prf_in` for the author name. This error is thrown when the page evaluates but returns no `data.name`, meaning the expected profile page never rendered — typically a CAPTCHA/bot-check page, a rate-limit page, or a Scholar layout change.
Source
Thrown at clis/google-scholar/profile.js:76
rank: i + 1,
title: titleEl.textContent.trim(),
cited: citedEl ? citedEl.textContent.trim() : '0',
year: yearEl ? yearEl.textContent.trim() : '',
});
}
return {
name: name.trim(),
affiliation: affiliation.trim(),
citations: citations,
hIndex: hIndex,
i10Index: i10Index,
papers: papers,
};
})()`);
if (!data?.name) {
throw new CommandExecutionError(`Could not load Google Scholar profile for: ${author}`);
}
if (!data.papers || data.papers.length === 0) {
throw new CommandExecutionError(`No papers found for: ${data.name || author}`);
}
const summary = {
rank: 0,
title: data.name + (data.affiliation ? ' (' + data.affiliation + ')' : ''),
cited: 'h=' + data.hIndex + ' i10=' + data.i10Index + ' total=' + data.citations,
year: '-',
};
return [summary, ...data.papers];
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Wait and retry with backoff — this is most often temporary bot detection/rate limiting.
- Open https://scholar.google.com/citations?user=<ID>&hl=en in a browser to confirm the profile exists and the page renders normally.
- Verify the 12-char user ID is correct (copy it from the profile URL).
- Run from a residential IP or different network, and reduce request frequency.
Example fix
// before opencli run google-scholar profile "JicYPdAAAAAJ" // fails with CAPTCHA page // after sleep 30 && opencli run google-scholar profile "JicYPdAAAAAJ" // retry after backoff
Defensive patterns
Strategy: retry
Try / catch
for (let attempt = 0; attempt < 3; attempt++) {
try { return await run('google-scholar profile', author); }
catch (e) {
if (!/Could not load Google Scholar profile/.test(e.message)) throw e;
await sleep(2 ** attempt * 5000);
}
} Prevention
- Throttle Scholar requests and add exponential backoff.
- Avoid datacenter/VPN IPs that trigger bot detection.
- Confirm user IDs exist before querying.
- Space out bulk profile scrapes.
When it happens
Trigger: Calling `google-scholar profile <author>` where navigation succeeded but `document.querySelector('#gsc_prf_in')` is null: invalid/expired user ID, CAPTCHA or 'unusual traffic' interstitial, non-profile page (e.g. redirected to error), or Scholar DOM change.
Common situations: Scraping many profiles in a row until Google rate-limits the IP; a datacenter/VPN IP flagged by Google; passing a made-up or truncated user ID; temporary Scholar outage or A/B layout test.
Related errors
- No profile found for: ${author}
- No papers found for: ${data.name || author}
- Google Scholar search returned an unexpected payload shape
- google-scholar/search
- amazon ${action} hit a robot check
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/e592b839de6571fe.
Report an issue: GitHub.