{"record":{"id":"ff6a696ea29f6e67","repo":"tonhowtf/omniget","slug":"n-o-reconheci-esse-perfil-ou-cole-o","errorCode":null,"errorMessage":"não reconheci esse perfil ou coleção: {}","messagePattern":"não reconheci esse perfil ou coleção: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/tiktok/download.rs","lineNumber":124,"sourceCode":"    for url in expand_inputs(list) {\n        if !out.contains(&url) {\n            out.push(url);\n        }\n    }\n    if limit > 0 && out.len() > limit as usize {\n        out.truncate(limit as usize);\n    }\n    out\n}\n\n/// Lista os vídeos de um perfil ou coleção com uma só chamada de yt-dlp.\nasync fn expand_profile(\n    input: &str,\n    limit: u32,\n    cookies: Option<&std::path::Path>,\n) -> Result<Vec<String>> {\n    let target = parse_target(input)\n        .ok_or_else(|| anyhow!(\"não reconheci esse perfil ou coleção: {}\", input))?;\n    match target {\n        Target::User { .. } | Target::Collection { .. } | Target::Music { .. } => {}\n        _ => return Err(anyhow!(\"isso é um vídeo, não um perfil: {}\", input)),\n    }\n    let url = canonical_url(&target);\n    let v = super::ytdlp_json(&super::ytdlp_list_args(&url, limit, cookies)).await?;\n    let entries = super::favorites::entries_from_list(&v);\n    Ok(entries.into_iter().map(|e| e.url).collect())\n}\n\nfn cookies_path(opts: &Options, session: &TempCookies) -> Option<PathBuf> {\n    if let Some(c) = opts.cookies.as_deref().filter(|c| !c.trim().is_empty()) {\n        return Some(PathBuf::from(c));\n    }\n    session.path().map(|p| p.to_path_buf())\n}\n\npub async fn run(opts: &Options, progress: ProgressFn) -> Result<DownloadResult> {","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/tiktok/download.rs#L106-L142","documentation":"tiktok::download::expand_profile parses the user-supplied input into a Target enum; if parse_target returns None the input is neither a recognized TikTok profile, collection, nor music URL, and it throws \"não reconheci esse perfil ou coleção: {input}\". The message interpolates the original input for diagnosis.","triggerScenarios":"Calling run with opts.profile set to a string that parse_target cannot classify: arbitrary text, a shortened/redirect URL (vm.tiktok.com), a regional domain variant, a username without the expected URL shape, or a private/deleted page.","commonSituations":"Pasting a TikTok share link (short URL) instead of the canonical profile URL; typos in the username; passing an @handle alone when the parser expects a full URL; TikTok URL format changes not yet handled by parse_target.","solutions":["Pass the full canonical profile URL (https://www.tiktok.com/@username) instead of a handle or short link","Resolve short share links (vm.tiktok.com/xxx) to their canonical form first","Check parse_target's accepted patterns and align the input with them","Use the video download mode if the target is actually a single video"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"fn looks_like_profile(input: &str) -> bool {\n    let u = input.trim();\n    u.contains(\"tiktok.com/@\") || u.contains(\"/collection/\") || u.contains(\"/music/\")\n}\nif !looks_like_profile(&profile) { /* reject before calling run */ }","typeGuard":"fn is_profile_url(input: &str) -> bool {\n    let u = input.trim();\n    (u.starts_with(\"https://www.tiktok.com/@\") && !u.contains(\"/video/\"))\n        || u.contains(\"/collection/\") || u.contains(\"/music/\")\n}","tryCatchPattern":"match download::run(&opts, progress).await {\n    Err(e) if e.to_string().contains(\"não reconheci esse perfil\") => {\n        // show 'invalid profile URL' and re-prompt\n    }\n    other => other,\n}","preventionTips":["Require full canonical tiktok.com profile URLs, not share/short links","Resolve short URLs before passing them in","Use the app's own parse_target for pre-validation","Keep parse_target updated for TikTok URL format changes"],"tags":["tiktok","url-parsing","invalid-input","rust","validation"],"backgroundTag":"invalid-url-format","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"}