tonhowtf/omniget · error
não reconheci um vídeo do Bilibili em
Error message
não reconheci um vídeo do Bilibili em: {} What it means
After resolving b23.tv short links, run() calls url_kind::detect on the effective URL and throws 'não reconheci um vídeo do Bilibili em: <url>' if the URL doesn't match any known Bilibili video pattern (BV/av id, etc.). The pipeline cannot parse danmaku for an unrecognized URL shape.
Solutions
- Paste a canonical video URL containing a BV or av id (e.g. https://www.bilibili.com/video/BV...)
- Strip surrounding text/quotes from the pasted link before passing it
- If it's a b23 short link, ensure network access so resolve_b23 can expand it before detect
- If a valid video URL is still rejected, update url_kind::detect to cover the new URL format
Example fix
// before
let url = "https://space.bilibili.com/12345"; // not a video page
export::run(&ExportOptions { url: url.into(), ..opts }).await?;
// after
let url = "https://www.bilibili.com/video/BV1xx411c7mD";
anyhow::ensure!(url.contains("/video/BV") || url.contains("av"), "link precisa ser de um vídeo (BV/av)");
export::run(&ExportOptions { url: url.into(), ..opts }).await?; Defensive patterns
Strategy: validation
Validate before calling
fn looks_like_bilibili_video(url: &str) -> bool {
let u = url.trim();
u.contains("bilibili.com/video/") && (u.contains("/BV") || u.contains("?p="))
|| u.contains("b23.tv")
} Try / catch
match export::run(&opts, &progress).await {
Err(e) if e.to_string().starts_with("não reconheci um vídeo") => ask_user_for_canonical_video_url(),
Err(e) => propagate(e)?,
Ok(res) => use_result(res),
} Prevention
- Extract the URL from share text with a regex before passing it in
- Reject known non-video Bilibili pages (space, live, opus) in the UI
- Keep url_kind::detect patterns updated for new Bilibili URL formats
When it happens
Trigger: Passing a non-video Bilibili URL (user profile, space, live room, article/opus, search page), a URL from another site, or a malformed link that even after b23 expansion doesn't contain a video id.
Common situations: User pastes a live-stream link instead of a VOD; copies a share text with extra text; URL from bilibili for a new content type (e.g. /opus) that url_kind::detect doesn't support yet; b23 resolution followed to a login/app redirect page.
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
- Could not extract post ID
- cole o link do vídeo do Bilibili
- Failed to detect URL kind
- Could not extract pin ID
- Expected a JSON array of cookie objects.
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/317b3382a172f6f9.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/platforms/bilibili/danmaku/export.rs:107
let client = build_client(slug.as_deref())?;
report(
progress,
ID,
"progress",
1,
Some(4),
Some("resolvendo o link".into()),
);
let mut effective = url.to_string();
if url_kind::is_b23_short(&effective) {
match url_kind::resolve_b23(&client, &effective).await {
Ok(full) => effective = full,
Err(e) => return Err(friendly(e, with_account)),
}
}
let kind = url_kind::detect(&effective)
.map_err(|_| anyhow!("não reconheci um vídeo do Bilibili em: {}", url))?;
let parsed = parser::parse(&client, &kind)
.await
.map_err(|e| friendly(e, with_account))?;
let parts = collect_parts(&parsed);
if parts.is_empty() {
return Err(anyhow!(
"esse link não tem parte de vídeo com comentários — abra uma parte específica"
));
}
let wanted = if opts.page > 0 {
opts.page
} else {
page_from_kind(&kind)
};
let part = pick_part(&parts, wanted).ok_or_else(|| {
anyhow!(
"a parte {} não existe; esse vídeo tem {}",View on GitHub (pinned to 8600b91f42)