{"record":{"id":"e592b839de6571fe","repo":"jackwener/OpenCLI","slug":"could-not-load-google-scholar-profile-for-autho","errorCode":null,"errorMessage":"Could not load Google Scholar profile for: ${author}","messagePattern":"Could not load Google Scholar profile for: (.+?)","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/google-scholar/profile.js","lineNumber":76,"sourceCode":"                    rank: i + 1,\n                    title: titleEl.textContent.trim(),\n                    cited: citedEl ? citedEl.textContent.trim() : '0',\n                    year: yearEl ? yearEl.textContent.trim() : '',\n                });\n            }\n\n            return {\n                name: name.trim(),\n                affiliation: affiliation.trim(),\n                citations: citations,\n                hIndex: hIndex,\n                i10Index: i10Index,\n                papers: papers,\n            };\n        })()`);\n\n        if (!data?.name) {\n            throw new CommandExecutionError(`Could not load Google Scholar profile for: ${author}`);\n        }\n\n        if (!data.papers || data.papers.length === 0) {\n            throw new CommandExecutionError(`No papers found for: ${data.name || author}`);\n        }\n\n        const summary = {\n            rank: 0,\n            title: data.name + (data.affiliation ? ' (' + data.affiliation + ')' : ''),\n            cited: 'h=' + data.hIndex + ' i10=' + data.i10Index + ' total=' + data.citations,\n            year: '-',\n        };\n\n        return [summary, ...data.papers];\n    },\n});\n","sourceCodeStart":58,"sourceCodeEnd":93,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/google-scholar/profile.js#L58-L93","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nopencli run google-scholar profile \"JicYPdAAAAAJ\"   // fails with CAPTCHA page\n// after\nsleep 30 && opencli run google-scholar profile \"JicYPdAAAAAJ\"  // retry after backoff","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"for (let attempt = 0; attempt < 3; attempt++) {\n  try { return await run('google-scholar profile', author); }\n  catch (e) {\n    if (!/Could not load Google Scholar profile/.test(e.message)) throw e;\n    await sleep(2 ** attempt * 5000);\n  }\n}","preventionTips":["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."],"tags":["scraping","browser","google-scholar","captcha"],"backgroundTag":"scraper-captcha-or-blocked-page","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}