{"record":{"id":"bbdba7c0f36ebd60","repo":"jackwener/OpenCLI","slug":"amazon-discussion-page-did-not-expose-review-summa","errorCode":null,"errorMessage":"amazon discussion page did not expose review summary (landed on ${landedUrl})","messagePattern":"amazon discussion page did not expose review summary \\(landed on (.+?)\\)","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/amazon/discussion.js","lineNumber":115,"sourceCode":"            positional: true,\n            help: 'ASIN or product URL, for example B0FJS72893',\n        },\n        {\n            name: 'limit',\n            type: 'int',\n            default: 10,\n            help: 'Maximum number of review samples to return (default 10)',\n        },\n    ],\n    columns: ['asin', 'average_rating_value', 'total_review_count'],\n    func: async (page, kwargs) => {\n        const input = String(kwargs.input ?? '');\n        const limit = Math.max(1, Number(kwargs.limit) || 10);\n        const payload = await readDiscussionPayload(page, input, limit);\n        const normalized = normalizeDiscussionPayload(payload);\n        if (!normalized.average_rating_text && !normalized.total_review_count_text) {\n            const landedUrl = cleanText(payload.href) || buildDiscussionUrl(input);\n            throw new CommandExecutionError(`amazon discussion page did not expose review summary (landed on ${landedUrl})`, 'The review page may have changed or hit a robot check. Open the review page in Chrome and retry.');\n        }\n        return [normalized];\n    },\n});\nexport const __test__ = {\n    normalizeDiscussionPayload,\n    hasDiscussionSummary,\n    isSignInState,\n};\n","sourceCodeStart":97,"sourceCodeEnd":125,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/amazon/discussion.js#L97-L125","documentation":"CommandExecutionError thrown as the final sanity check of the amazon discussion command: after normalization, neither average_rating_text nor total_review_count_text is present, so the CLI refuses to return an empty review summary. The message includes the URL actually landed on to help diagnose redirects or robot checks. This is the guard for 'the page rendered but had none of the expected review summary elements'.","triggerScenarios":"Running amazon discussion where readDiscussionPayload returned a payload (from the review or product page) lacking both [data-hook=rating-out-of-text] and [data-hook=total-review-count] content — e.g. a robot-check page, an interstitial, or a markup change landed at the URL printed in the message.","commonSituations":"Amazon captcha/robot interstitial replacing the review page; Amazon A/B layout change renaming data-hook attributes; product with no reviews rendered on a variant page; regional redirect to a page with different markup.","solutions":["Open the landed URL (in the message) in Chrome, complete any captcha, confirm reviews show, and retry","Verify the product actually has reviews; zero-review products may trip this","Retry with backoff — transient robot checks are common under rapid scraping","If persistent on pages that render manually, update the [data-hook=...] selectors in readCurrentDiscussionPayload for the new layout"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"async function getDiscussion(asin, tries = 3) {\n  try {\n    return await opencli.call('amazon discussion', { input: asin });\n  } catch (e) {\n    if (/did not expose review summary/.test(e.message) && tries > 0) {\n      await sleep(5000);\n      return getDiscussion(asin, tries - 1);\n    }\n    throw e;\n  }\n}","preventionTips":["Throttle scraping to avoid robot checks","Open the landed URL manually to clear captchas before retrying","Treat products with zero reviews as a legit 'no summary' case"],"tags":["amazon","scraping","robot-check","dom-scraping"],"backgroundTag":"scrape-target-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}