{"record":{"id":"fe0f0b07a6221e29","repo":"tonhowtf/omniget","slug":"this-video-requires-login-import-cookies-for-this-site-in","errorCode":null,"errorMessage":"This video requires login. Import cookies for this site in Settings → Cookies, then retry.","messagePattern":"This video requires login\\. Import cookies for this site in Settings → Cookies, then retry\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":4442,"sourceCode":"            \"Console encoding error (non-UTF-8 locale). Update yt-dlp in Settings → Dependencies, or run `chcp 65001` in a terminal and reopen the app.\"\n        );\n    }\n\n    if lower.contains(\"http error 429\") {\n        return anyhow!(\"Server returned error 429 (too many requests). Try again later.\");\n    }\n    if lower.contains(\"http error 403\") || lower.contains(\"forbidden\") {\n        return anyhow!(\"Access denied (403). The video may be private or region-restricted.\");\n    }\n    if lower.contains(\"sign in to confirm\")\n        || lower.contains(\"login required\")\n        || stderr.contains(\"请先登录\")\n        || stderr.contains(\"需要登录\")\n        || stderr.contains(\"登录后可\")\n        || stderr.contains(\"仅登录用户\")\n        || lower.contains(\"this video is only available\") && lower.contains(\"members\")\n    {\n        return anyhow!(\n            \"This video requires login. Import cookies for this site in Settings → Cookies, then retry.\"\n        );\n    }\n    if lower.contains(\"invalid data found when processing input\") {\n        return anyhow!(\n            \"Downloaded streams are DRM-protected and cannot be merged. This content is not supported.\"\n        );\n    }\n    if lower.contains(\"nsig extraction failed\") || lower.contains(\"nsig\") {\n        return anyhow!(\"Video extraction failed. Update yt-dlp or try again.\");\n    }\n    if lower.contains(\"cannot parse data\")\n        || lower.contains(\"please report this issue\")\n        || (lower.contains(\"confirm you are on the latest version\") && lower.contains(\"yt-dlp\"))\n    {\n        return anyhow!(\n            \"yt-dlp extractor is broken for this site. Update yt-dlp in Settings → Dependencies, then retry.\"\n        );","sourceCodeStart":4424,"sourceCodeEnd":4460,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L4424-L4460","documentation":"translate_ytdlp_error at ytdlp.rs:4442 maps login-gated stderr patterns ('sign in to confirm', 'login required', several Chinese login prompts, or a members-only video marker) to this message. The site requires an authenticated session to expose the video, so extraction cannot proceed anonymously. The library throws it to tell the user to supply cookies.","triggerScenarios":"yt-dlp stderr matches 'sign in to confirm', 'login required', '请先登录', '需要登录', '登录后可', '仅登录用户', or simultaneously 'this video is only available' and 'members' — e.g. YouTube's bot/login check or members-only content during extraction.","commonSituations":"YouTube returning 'Sign in to confirm you're not a bot'; age-restricted videos without cookies; Patreon/YouTube members-only uploads; site-localized Chinese login walls on region-specific platforms.","solutions":["Import cookies for the target site in Settings → Cookies, then retry the download.","Export cookies from a logged-in browser session (Netscape format) and re-import if the first attempt fails.","Update yt-dlp, as newer versions sometimes bypass or change login/bot-check handling.","If the video is members-only, ensure the cookies come from an account with the required membership."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verify cookies exist and are non-expired before queuing a login-gated site\nfunction hasFreshCookies(site) {\n  const jar = loadCookieJar(site);\n  return jar && jar.cookies.length > 0 && new Date(jar.expiresAt) > new Date();\n}\nif (!hasFreshCookies('youtube')) promptCookieImport();","typeGuard":null,"tryCatchPattern":"try {\n  await download(url);\n} catch (e) {\n  if (isLoginRequired(e)) notifyUser('Import cookies in Settings → Cookies, then retry');\n  else throw e;\n}","preventionTips":["Import cookies before downloading members-only or age-restricted media","Re-export cookies when browser sessions expire","Watch for 'sign in to confirm' bot-checks and back off before retrying"],"tags":["auth","cookies","ytdlp","login"],"backgroundTag":"authentication-required","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}