{"record":{"id":"76922d1b358bfab0","repo":"jackwener/OpenCLI","slug":"jike-post-page-did-not-expose-the-expected-data-sc","errorCode":null,"errorMessage":"Jike post page did not expose the expected data script","messagePattern":"Jike post page did not expose the expected data script","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/jike/post.js","lineNumber":65,"sourceCode":"    }\n\n    return result;\n  } catch (e) {\n    return { ok: false, reason: 'parse-error', message: e?.message || String(e) };\n  }\n})()\n`);\n        if (Array.isArray(data)) {\n            return data.map((item) => ({\n                type: item.type ?? '',\n                author: item.author ?? '',\n                content: item.content ?? '',\n                likes: item.likes ?? 0,\n                time: item.time ?? '',\n            }));\n        }\n        if (data?.reason === 'missing-data-script') {\n            throw new CommandExecutionError('Jike post page did not expose the expected data script');\n        }\n        if (data?.reason === 'parse-error') {\n            throw new CommandExecutionError(`Failed to parse Jike post data: ${data.message || 'unknown error'}`);\n        }\n        throw new CommandExecutionError('Jike post returned an unreadable payload');\n    },\n});\n","sourceCodeStart":47,"sourceCodeEnd":73,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/jike/post.js#L47-L73","documentation":"The Jike post command scrapes the post's web page for an embedded data script. The page-loader reports reason 'missing-data-script' when no such script tag is found, and the CLI converts that into CommandExecutionError because it cannot read the post without it.","triggerScenarios":"Fetching a post whose HTML page lacks the expected embedded JSON script — deleted or private post, non-existent post ID, SSRF/anti-bot interstitial page, or a Jike frontend redesign that renamed/relocated the script.","commonSituations":"Post was deleted or made private since the ID was captured; typo/wrong post ID in the URL; Jike changed page markup in a frontend update; bot-detection wall serving alternate HTML; regional block.","solutions":["Verify the post ID/URL is correct and the post still exists in the Jike app/web","Open the post URL in a browser to see if an anti-bot or login wall is served","Update the CLI to the latest version to track Jike frontend markup changes","Use the Jike API endpoint (if authenticated) instead of scraping the page"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify the post URL looks valid before scraping\nif (!/^https?:\\/\\/web\\.okjike\\.com\\/[0-9a-fA-F-]+$/.test(postUrl)) {\n  throw new Error('Invalid Jike post URL');\n}","typeGuard":"function isPostPageData(d) {\n  return d !== null && typeof d === 'object' && d.reason !== 'missing-data-script';\n}","tryCatchPattern":"try {\n  await cli('jike', 'post', [postUrl]).run();\n} catch (e) {\n  if (String(e.message).includes('did not expose the expected data script')) {\n    // fall back to authenticated API fetch or report post as unavailable\n  } else throw e;\n}","preventionTips":["Verify the post exists and is public before scraping","Update the CLI after Jike frontend redesigns","Check for bot walls by loading the page in a browser"],"tags":["scraping","missing-data","jike"],"backgroundTag":"missing-embedded-data","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}