jackwener/OpenCLI · warning
xueqiu comments pagination stopped after request ${requestNu
Error message
xueqiu comments pagination stopped after request ${requestNumber}, collected ${collected}/${target} items, reason: reached safety cap What it means
A warning emitted when the collector hits options.maxRequests — the hard safety cap on how many page requests may be issued — before collecting options.limit items. It exists to bound runtime and request volume against the site.
Source
Thrown at clis/xueqiu/comments.js:292
for (const row of pageRows) {
if (seenIds.has(row.id))
continue;
seenIds.add(row.id);
rows.push(row);
advanced = true;
}
if (rows.length >= options.limit) {
return rows.slice(0, options.limit);
}
if (rawItems.length < options.pageSize) {
break;
}
if (!advanced) {
warn(buildPaginationStopMessage(requestNumber, rows.length, options.limit, 'pagination did not advance'));
break;
}
if (requestNumber === options.maxRequests) {
warn(buildPaginationStopMessage(requestNumber, rows.length, options.limit, 'reached safety cap'));
}
}
return rows.slice(0, options.limit);
}
cli({
site: 'xueqiu',
name: 'comments',
access: 'read',
description: '获取单只股票的讨论动态',
domain: 'xueqiu.com',
strategy: Strategy.COOKIE,
browser: true,
navigateBefore: false,
args: [
{
name: 'symbol',
positional: true,
required: true,View on GitHub (pinned to 49907e53dc)
Solutions
- Lower --limit to a value achievable within the safety cap
- Raise options.maxRequests if more requests are acceptable
- Increase --page-size to collect more per request
- Run the command repeatedly with offset handling if the CLI supports it
Example fix
// before clis/xueqiu/comments.js --limit 1000 // maxRequests=30, pageSize=20 -> caps at 600 // after clis/xueqiu/comments.js --limit 500 // fits within cap
Defensive patterns
Strategy: validation
Validate before calling
if (limit > maxRequests * pageSize) throw new Error(`limit ${limit} exceeds cap ${maxRequests * pageSize}`); Prevention
- Compute limit as maxRequests * pageSize before invoking
- Raise maxRequests deliberately when large exports are needed
- Prefer bigger pageSize over more requests
When it happens
Trigger: Requesting more comments than maxRequests * pageSize, e.g. --limit 1000 with a 20-item pageSize and maxRequests of 30, or a slow-yielding thread requiring more pages than the cap allows.
Common situations: Users asking for very large comment exports; long-running hot threads; small pageSize combined with a large limit.
Related errors
- Sales Navigator messaging threads API returned the same curs
- rednote/user
- Tieba did not land on the requested page
- xueqiu comments pagination stopped after request ${requestNu
- Not a git repository
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/2e99805a6ede26f3.
Report an issue: GitHub.