{"record":{"id":"2f4ea97800278ba4","repo":"jackwener/OpenCLI","slug":"jike-user-page-did-not-expose-the-expected-data-sc","errorCode":null,"errorMessage":"Jike user page did not expose the expected data script","messagePattern":"Jike user page did not expose the expected data script","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/jike/user.js","lineNumber":58,"sourceCode":"  }\n})()\n`);\n        if (Array.isArray(data)) {\n            if (data.length === 0) {\n                throw new EmptyResultError('jike user', `No posts were returned for user ${args.username}. Confirm the username and login state.`);\n            }\n            return data.slice(0, limit).map((item) => ({\n                id: item.id ?? '',\n                content: item.content ?? '',\n                type: item.type ?? '',\n                likes: item.likes ?? 0,\n                comments: item.comments ?? 0,\n                time: item.time ?? '',\n                url: `https://web.okjike.com/originalPost/${item.id ?? ''}`,\n            }));\n        }\n        if (data?.reason === 'missing-data-script') {\n            throw new CommandExecutionError('Jike user page did not expose the expected data script');\n        }\n        if (data?.reason === 'parse-error') {\n            throw new CommandExecutionError(`Failed to parse Jike user data: ${data.message || 'unknown error'}`);\n        }\n        throw new CommandExecutionError('Jike user returned an unreadable payload');\n    },\n});\n","sourceCodeStart":40,"sourceCodeEnd":66,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/jike/user.js#L40-L66","documentation":"CommandExecutionError thrown when the inline browser script that extracts Jike user data reports reason 'missing-data-script', meaning the page HTML contained no recognizable script embedding the post data. The library throws this instead of returning an empty list so callers know the page structure changed or the wrong page was served.","triggerScenarios":"Executing `jike user` when the fetched web.okjike.com profile page does not contain the expected data-bearing <script> tag: Jike redesigned their page, a bot-check/verification page was served, or a network error page replaced the profile.","commonSituations":"Jike frontend update changing script identifiers; CDN or anti-bot interstitial (captcha) page returned instead of the profile; offline or captive-network environment serving an error page.","solutions":["Open the profile URL in a normal browser to check whether a captcha or login wall appears and complete it","Retry the command — the failure is often transient (interstitial page)","Update the CLI in case a newer version tracks a Jike page-structure change","Inspect the saved/printed HTML to locate the new script tag and adjust the extraction selector"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const posts = await jikeUser({ username, limit });\n} catch (e) {\n  if (String(e.message).includes('data script')) {\n    // transient page interstitial — retry once after delay\n    await sleep(2000);\n    return jikeUser({ username, limit });\n  }\n  throw e;\n}","preventionTips":["Retry after a short delay — anti-bot/interstitial pages are often transient","Keep the CLI updated for Jike page-structure changes","Check the page manually in a browser when it persists","Avoid running behind proxies that inject or strip page content"],"tags":["scraping","dom-parsing","page-structure"],"backgroundTag":"scrape-selector-mismatch","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}