{"record":{"id":"26f466375bb34693","repo":"jackwener/OpenCLI","slug":"note-youdao-com","errorCode":null,"errorMessage":"note.youdao.com","messagePattern":"note\\.youdao\\.com","errorType":"exception","errorClass":"AuthRequiredError","httpStatus":null,"severity":"error","filePath":"clis/youdao/note.js","lineNumber":181,"sourceCode":"            }\n          }\n        } catch {}\n      }\n      return [true, title, content, summary, keywords.join(' | '), contentData.ct || null, contentData.sz || null, hasContentField, rawContent.length, window.location.href];\n    })()\n  `;\n}\n\nfunction normalizeExtractionResult(payload, sourceUrl) {\n  const data = unwrapEvaluateResult(payload);\n  if (!Array.isArray(data)) {\n    throw new CommandExecutionError('Youdao note extractor returned a malformed payload');\n  }\n  const ok = data[0] === true;\n  if (!ok) {\n    const reason = typeof data[1] === 'string' && data[1].trim() ? data[1].trim() : 'unknown_parser_failure';\n    if (reason === 'auth') {\n      throw new AuthRequiredError('note.youdao.com', 'Youdao shared note requires login or additional permission');\n    }\n    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  }","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/youdao/note.js#L163-L199","documentation":"AuthRequiredError thrown by normalizeExtractionResult when the in-page classifier detects login/permission text ('登录', '无权', 'forbidden', captcha, etc.) on the shared note page (reason === 'auth'). The shared note requires login or extra permission, which the anonymous browser session doesn't have; the message 'note.youdao.com' is the site field of the error.","triggerScenarios":"The share link was set to require login; the note's owner restricted access or revoked public sharing; Youdao served a captcha/security verification; rate limiting pushed the page into a login wall; the note is internal to an org requiring auth.","commonSituations":"Corporately-owned notes with restricted sharing; too many automated requests triggering Youdao's anti-bot captcha; share links that expired into permission-gated states; scraping from an IP/region Youdao distrusts.","solutions":["Verify the link opens without login in a private/incognito browser window; if not, ask the owner to re-share it as a public link","Provide an authenticated browser session/cookies if the library/runner supports it","Slow down request rate or change IP to avoid captcha/security-verification triggers","Re-generate the share link from Youdao Notes and retry with the fresh URL"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await youdaoNote(url);\n} catch (e) {\n  if (e.name === 'AuthRequiredError' || /requires login|AuthRequired/i.test(String(e.message))) {\n    // verify the link is public in incognito; attach credentials or ask owner to re-share\n  } else throw e;\n}","preventionTips":["Verify share links open in a private window before bulk processing","Throttle request rate to avoid captcha/security walls","Refresh share links periodically; owners can revoke or restrict them","Use a reputable egress IP/region for automated access"],"tags":["auth-required","login-wall","captcha","sharing-permissions"],"backgroundTag":"auth-required-login-wall","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}