jackwener/OpenCLI · error · Error

No videos found on /explore + suffix

Error message

No videos found on /explore + suffix

What it means

The injected /explore scraping script extracted zero video rows after deduplication. When explore API fallbacks also failed, the error message appends the per-API failure reasons. Thrown inside the browser context as a plain Error with the 'No videos found on /explore' prefix.

Source

Thrown at clis/tiktok/explore.js:120

    }
  }
  if (dedup.size < limit) {
    try {
      // Keep the previous recommend feed as a compatibility fallback for
      // regions where /explore still hydrates from the For You endpoint.
      await collectEndpoint('/api/recommend/item_list/', 'recommend', { from_page: 'fyp' }, 0);
    } catch (error) {
      apiFailures.push(error instanceof Error ? error.message : String(error));
    }
  }

  const rows = Array.from(dedup.values())
    .slice(0, limit)
    .map((row, index) => ({ ...row, index: index + 1 }));

  if (rows.length === 0) {
    const suffix = apiFailures.length ? ' (explore APIs failed: ' + apiFailures.join('; ') + ')' : '';
    throw new Error('No videos found on /explore' + suffix);
  }
  return rows;
})()
`;
}

async function listExploreVideos(page, args) {
    const limit = requireLimit(args.limit, { fallback: DEFAULT_LIMIT, max: MAX_LIMIT });
    await page.goto('https://www.tiktok.com/explore', { waitUntil: 'load', settleMs: 5000 });
    let rows;
    try {
        rows = await page.evaluate(buildExploreScript(limit));
    } catch (error) {
        throwTikTokPageContextError(error, {
            authMessage: 'TikTok requires browser access to load the explore feed',
            emptyPattern: /No videos found/,
            emptyTarget: 'tiktok explore',
            failureMessage: 'Failed to load TikTok explore feed',

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Read the appended apiFailures detail to see why the API fallbacks failed
  2. Open /explore in the same Chrome profile and confirm videos render manually (login wall/captcha?)
  3. Update the library — selector or API changes on TikTok's side require a patch
  4. Try a different explore suffix/category or remove the suffix to use the default explore page
  5. Check your region/IP — some regions return an empty explore page

Example fix

// before
const rows = await listExploreVideos(page, { limit: 20 });
// after
try {
  const rows = await listExploreVideos(page, { limit: 20 });
} catch (e) {
  if (/No videos found on \/explore/.test(e.message)) {
    await page.goto(TIKTOK_HOST + '/explore'); // re-warm, solve any wall
    return listExploreVideos(page, { limit: 20 });
  }
  throw e;
}
Defensive patterns

Strategy: fallback

Validate before calling

await page.goto(TIKTOK_HOST + '/explore', { waitUntil: 'networkidle2' });
const rendered = await page.$$eval('[data-e2e="explore-item"], a[href*="/video/"]', els => els.length);
if (rendered === 0) throw new Error('Explore page rendered no items — check login wall/region');

Try / catch

try {
  rows = await listExploreVideos(page, opts);
} catch (e) {
  if (/No videos found on \/explore/.test(e.message)) {
    // fall back to a different source, e.g. recommend feed or hashtag page
    return fallbackVideoSource(page, opts);
  }
  throw e;
}

Prevention

When it happens

Trigger: The /explore page (optionally with a suffix path/category) rendered no videos matching the selectors, and all explore API fallbacks either weren't attempted or failed (apiFailures non-empty adds details).

Common situations: TikTok showing a login wall or captcha instead of explore content, region restrictions making /explore empty, TikTok DOM/classname changes breaking the extraction selectors, or a category suffix that has no content in the current region.

Related errors


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