jackwener/OpenCLI · warning

xueqiu comments pagination stopped after request ${requestNu

Error message

xueqiu comments pagination stopped after request ${requestNumber}, collected ${collected}/${target} items, reason: pagination did not advance

What it means

A warning emitted when a fetched page contains rows but none of them advanced pagination: every row id was already in seenIds, so the loop stops with reason 'pagination did not advance'. It protects against infinite loops when xueqiu keeps returning the same page.

Source

Thrown at clis/xueqiu/comments.js:288

            }
            break;
        }
        let advanced = false;
        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: [

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Accept the partial result — collected rows up to the duplicate point are returned
  2. Reduce --page-size so the cursor advances within the site's supported window
  3. Check whether the thread genuinely has fewer comments than --limit and lower the target
  4. Update the client to use xueqiu's current pagination parameter name
Defensive patterns

Strategy: retry

Try / catch

try { rows = await collectCommentRows(opts); } catch (e) { if (rows.length) usePartial(rows); else throw e; }

Prevention

When it happens

Trigger: During collectCommentRows, a page (rawItems.length >= pageSize) yields only duplicate ids already collected — typically when the page token/next-page cursor is ignored by the site or the sort order resets between requests.

Common situations: Hot discussion threads where new comments shift the first page so the cursor re-serves seen items; xueqiu ignoring the page parameter for large threads; stale session causing cached responses.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/f5d18ab73e627e25. Report an issue: GitHub.