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
list_public() in tiktok/favorites.rs first parses the user-supplied input with super::parse_target; when the input matches neither a user handle nor a collection URL, it fails with this anyhow error embedding the original input. It is an input-format guard ensuring only recognized TikTok targets proceed to URL canonicalization.
Solutions
- Pass a profile as @handle (e.g. @usuario) or a collection URL matching .../@usuario/collection/nome-id.
- Strip surrounding whitespace, quotes, and locale prefixes (m./pt./www.) from the URL before calling.
- Confirm you did not paste a video (/video/ID) or live URL — those are not valid targets here.
- Inspect super::parse_target to see the exact accepted formats and normalize your input to one of them.
Example fix
// before
favorites::list_public("tiktok.com/@usuario?lang=pt-BR", "collection", 50, None).await?;
// after
favorites::list_public("https://www.tiktok.com/@usuario/collection/meus-favoritos-123", "collection", 50, None).await?; Defensive patterns
Strategy: validation
Validate before calling
// Rust
fn looks_like_target(input: &str) -> bool {
let s = input.trim();
(s.starts_with('@') && s.len() > 1)
|| (s.contains("tiktok.com/@") && (s.contains("/collection/") || !s.contains("/video/")))
}
assert!(looks_like_target("@usuario")); Type guard
enum Target { User { name: String }, Collection { name: String, id: String } }
fn is_collection(t: &Target) -> bool { matches!(t, Target::Collection { .. }) } Try / catch
match list_public(input, source, limit, cookies).await {
Ok(entries) => render(entries),
Err(e) if e.to_string().contains("não reconheci esse perfil") => eprintln!("Use @handle ou a URL completa da coleção"),
Err(e) => return Err(e),
} Prevention
- Normalize input (trim, strip locale prefixes) before passing it to the library.
- Only accept inputs that match @handle or a tiktok.com/@user/collection/... URL in your UI layer.
- Keep a regex for valid TikTok handles/URLs and test it against common pasted junk.
- Show accepted input formats in the UI next to the input field.
When it happens
Trigger: Calling list_public (via run or the ao_vivo test) with an input string that parse_target cannot classify: a bare @handle with invalid characters, a full URL that is not a /collection/ URL, an empty string, or a mistyped profile path.
Common situations: User pastes a TikTok video URL or a generic web URL instead of a profile/collection URL, forgets the leading @ for a handle, includes whitespace or locale prefixes (e.g. 'pt.tiktok.com'), or passes an internal ID expecting it to be recognized.
Understand the failure class
Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.
Related errors
- nenhum link do TikTok na entrada (cole as URLs, escolha um…
- cole a URL da coleção (…/@usuario/collection/nome-id)
- escolha pelo menos um arquivo
- não reconheci esse perfil ou coleção
- isso é um vídeo, não um perfil
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/a48236e04eada759.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/tiktok/favorites.rs:330
fn handle_of(input: &str) -> String {
match super::parse_target(input) {
Some(super::Target::User { name }) => name,
Some(super::Target::Video {
user: Some(user), ..
}) => user,
_ => input.trim().trim_start_matches('@').to_ascii_lowercase(),
}
}
async fn list_public(
input: &str,
source: &str,
limit: u32,
cookies: Option<&std::path::Path>,
) -> Result<Vec<Entry>> {
let target = super::parse_target(input)
.ok_or_else(|| anyhow!("não reconheci esse perfil ou coleção: {}", input))?;
let url = match (source, &target) {
("collection", super::Target::Collection { .. }) => super::canonical_url(&target),
("collection", _) => {
return Err(anyhow!(
"cole a URL da coleção (…/@usuario/collection/nome-id)"
))
}
_ => super::canonical_url(&super::Target::User {
name: handle_of(input),
}),
};
let v = super::ytdlp_json(&super::ytdlp_list_args(&url, limit, cookies)).await?;
Ok(entries_from_list(&v))
}
async fn list_private(
opts: &Options,
handle: &str,View on GitHub (pinned to 8600b91f42)