jackwener/OpenCLI · error · CommandExecutionError
No koubei data found — the series id may be wrong, or Autoho
Error message
No koubei data found — the series id may be wrong, or Autohome changed its page.
What it means
CommandExecutionError thrown by the autohome score command when extractPageProps cannot locate the __PAGE_PROPS__-style data blob in the fetched koubei page. Without that embedded JSON the parser has nothing to read, so the library fails fast rather than returning garbage.
Source
Thrown at clis/autohome/score.js:88
cli({
site: 'autohome',
name: 'score',
access: 'read',
aliases: ['koubei', 'rating'],
description: '汽车之家车系口碑评分(总分 + 各维度 + 故障率PPH + 竞品对比,免登录)',
strategy: Strategy.PUBLIC,
browser: false,
args: [
{ name: 'series_id', required: true, positional: true, help: '车系 ID(来自 brand 的 series_id,或 k.autohome.com.cn/<id> URL)' },
],
columns: SCORE_COLUMNS,
func: async (args) => {
const seriesId = normalizeSeriesId(args.series_id);
const html = await ahFetch(`${AH_KOUBEI_BASE}/${seriesId}`, `score ${seriesId}`);
const pp = extractPageProps(html);
if (!pp) {
throw new CommandExecutionError(
`autohome score ${seriesId}`,
'No koubei data found — the series id may be wrong, or Autohome changed its page.',
);
}
const rows = parseScore(pp, seriesId);
const map = Object.fromEntries(rows.map((r) => [r.field, r.value]));
if (!map.name && map.overall == null) {
throw new EmptyResultError(
`autohome score ${seriesId}`,
'This series has no koubei rating yet.',
);
}
return rows;
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Verify the series id by opening the series page on autohome.com.cn and confirming koubei ratings exist there.
- Re-derive the id from a current autohome series URL rather than an old bookmark.
- Retry later or from a different IP if an anti-bot page was served.
- If the markup changed, inspect the live page and update extractPageProps to the new data container.
Example fix
// before opencli autohome score 99999999 // nonexistent id -> error page // after opencli autohome score 4348 // valid series id with koubei data
Defensive patterns
Strategy: try-catch
Validate before calling
if (!Number.isInteger(Number(seriesId)) || Number(seriesId) <= 0) {
throw new Error('series_id must be a positive numeric autohome id');
} Type guard
function isValidSeriesId(v) {
return /^\d+$/.test(String(v).trim());
} Try / catch
try {
const rows = await score(seriesId);
} catch (e) {
if (/No koubei data found/.test(e.message)) {
console.error(`Series ${seriesId} has no koubei page — verify the id on autohome.com.cn`);
} else throw e;
} Prevention
- Extract series ids from current autohome.com.cn URLs, not old bookmarks.
- Open the series page in a browser to confirm koubei data exists before scripting.
- Handle upstream layout changes by keeping the scraping layer isolated and tested.
When it happens
Trigger: ahFetch succeeded for AH_KOUBEI_BASE/<seriesId> but the HTML lacks page props: wrong/nonexistent series id leading to an error page, an anti-bot/redirect page, or Autohome changing how koubei data is embedded.
Common situations: Using a series id copied from a URL fragment that isn't the koubei series id; ids scraped long ago that no longer exist; Autohome A/B-testing a new page layout without the props script.
Related errors
- autohome brand catalog returned an unexpected HTML shape; ex
- github-trending parser drift: missing ${field} for ${repo}
- github-trending parser drift: no repository rows found
- github-trending parser drift: missing repository link
- guazi browse ${code}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/405f86601c1968a7.
Report an issue: GitHub.