{"record":{"id":"6831c3cf23f267b4","repo":"jackwener/OpenCLI","slug":"youdao-note-parser-did-not-find-full-note-content","errorCode":null,"errorMessage":"Youdao note parser did not find full note content in the page store","messagePattern":"Youdao note parser did not find full note content in the page store","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/youdao/note.js","lineNumber":201,"sourceCode":"    if (reason === 'not_found') {\n      throw new EmptyResultError('youdao note', 'The shared note is missing, expired, cancelled, or inaccessible.');\n    }\n    throw new CommandExecutionError(`Youdao note parser failed: ${reason}`);\n  }\n  const title = String(data[1] ?? '');\n  const content = String(data[2] ?? '');\n  const summary = String(data[3] ?? '');\n  const keywords = String(data[4] ?? '');\n  const createTime = data[5];\n  const fileSize = data[6];\n  const hasContentField = data[7] === true;\n  const rawContentLength = Number(data[8] ?? 0);\n  const finalUrl = String(data[9] || sourceUrl);\n  if (!title) {\n    throw new CommandExecutionError('Youdao note parser did not extract a title');\n  }\n  if (!hasContentField) {\n    throw new CommandExecutionError('Youdao note parser did not find full note content in the page store');\n  }\n  if (rawContentLength > 0 && !content) {\n    throw new CommandExecutionError('Youdao note parser found note content but extracted no readable text');\n  }\n  const row = {};\n  row.title = title;\n  row.content = content;\n  row.summary = summary;\n  row.keywords = keywords;\n  row.created_at = formatYoudaoTimestamp(createTime);\n  row.file_size = fileSize == null ? '' : String(fileSize);\n  row.url = finalUrl;\n  return row;\n}\n\nvar command = cli({\n  site: 'youdao',\n  name: 'note',","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/youdao/note.js#L183-L219","documentation":"normalizeExtractionResult requires `data[7]` (hasContentField) to be true, proving the page store actually contained the full note content field. If it is false, the extractor only found metadata, so the library refuses to emit a truncated note.","triggerScenarios":"The in-page store object lacked the content key at the moment of evaluation — the note body had not loaded/hydrated yet, the share page rendered a preview-only or restricted view, or the store's shape changed so the extractor read the wrong index.","commonSituations":"Slow network leaving the SPA partially loaded; very large notes whose body loads lazily; Youdao UI update shifting store fields; accessing a note without full-share permission.","solutions":["Increase the pre-evaluate wait (page.wait) so the SPA fully hydrates before extracting","Confirm the share link grants full-content access when opened logged-out in a browser","Inspect the page store shape and update buildExtractorJs to read the correct content field/index","Retry the command once after a transient load failure"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!payload || payload.hasContentField !== true) {\n  throw new Error('Page store lacked full note content; increase wait or fix extraction');\n}","typeGuard":"function hasFullContent(p) {\n  return typeof p === 'object' && p !== null && p.hasContentField === true;\n}","tryCatchPattern":"try {\n  await cli.youdao.note({ url });\n} catch (e) {\n  if (/did not find full note content/.test(e.message)) {\n    await sleep(3000);\n    return cli.youdao.note({ url }); // retry after fuller load\n  }\n  throw e;\n}","preventionTips":["Wait for SPA hydration before evaluating the extractor","Confirm the share link exposes full content when logged out","Retry once on slow networks","Monitor Youdao store-shape changes"],"tags":["parsing","browser-automation","spa"],"backgroundTag":"extracted-field-missing","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}