tonhowtf/omniget · error · anyhow::Error
não reconheci esse perfil ou coleção
Error message
não reconheci esse perfil ou coleção: {} What it means
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.
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
Defensive patterns
Strategy: validation
Validate before calling
fn looks_like_profile(input: &str) -> bool {
let u = input.trim();
u.contains("tiktok.com/@") || u.contains("/collection/") || u.contains("/music/")
}
if !looks_like_profile(&profile) { /* reject before calling run */ } Type guard
fn is_profile_url(input: &str) -> bool {
let u = input.trim();
(u.starts_with("https://www.tiktok.com/@") && !u.contains("/video/"))
|| u.contains("/collection/") || u.contains("/music/")
} Try / catch
match download::run(&opts, progress).await {
Err(e) if e.to_string().contains("não reconheci esse perfil") => {
// show 'invalid profile URL' and re-prompt
}
other => other,
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- isso é um vídeo, não um perfil
- escolha a pasta de destino
- Could not extract clip slug
- Could not extract user and post_id from URL
- escolha a pasta de destino para organizar
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/ff6a696ea29f6e67.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/tiktok/download.rs:124
for url in expand_inputs(list) {
if !out.contains(&url) {
out.push(url);
}
}
if limit > 0 && out.len() > limit as usize {
out.truncate(limit as usize);
}
out
}
/// Lista os vídeos de um perfil ou coleção com uma só chamada de yt-dlp.
async fn expand_profile(
input: &str,
limit: u32,
cookies: Option<&std::path::Path>,
) -> Result<Vec<String>> {
let target = parse_target(input)
.ok_or_else(|| anyhow!("não reconheci esse perfil ou coleção: {}", input))?;
match target {
Target::User { .. } | Target::Collection { .. } | Target::Music { .. } => {}
_ => return Err(anyhow!("isso é um vídeo, não um perfil: {}", input)),
}
let url = canonical_url(&target);
let v = super::ytdlp_json(&super::ytdlp_list_args(&url, limit, cookies)).await?;
let entries = super::favorites::entries_from_list(&v);
Ok(entries.into_iter().map(|e| e.url).collect())
}
fn cookies_path(opts: &Options, session: &TempCookies) -> Option<PathBuf> {
if let Some(c) = opts.cookies.as_deref().filter(|c| !c.trim().is_empty()) {
return Some(PathBuf::from(c));
}
session.path().map(|p| p.to_path_buf())
}
pub async fn run(opts: &Options, progress: ProgressFn) -> Result<DownloadResult> {View on GitHub (pinned to 8600b91f42)