tonhowtf/omniget · error
cole um link do slideshare.net
Error message
cole um link do slideshare.net
What it means
Guard clause in `slides::download` that rejects any URL not containing the substring "slideshare.net". The tool only knows how to scrape SlideShare decks, so a non-SlideShare link is refused before any network request is made. It is a user-input validation error, not a runtime failure.
Solutions
- Pass a full URL that contains "slideshare.net" (e.g. https://www.slideshare.net/user/deck-title).
- Resolve short-link redirects to the final slideshare.net URL before calling download.
- If a different slide host must be supported, extend or add a dedicated downloader instead of reusing this function.
Example fix
// before
slides::download("https://slideshare.com/user/deck", dest, progress).await?;
// after
slides::download("https://www.slideshare.net/user/deck", dest, progress).await?; Defensive patterns
Strategy: validation
Validate before calling
if !url.contains("slideshare.net") {
return Err(format!("not a slideshare link: {}", url));
} Prevention
- Always pass the full final slideshare.net URL, not shorteners.
- Resolve redirect links (t.co, goo.gl) before calling.
- Normalize/trim pasted input first.
When it happens
Trigger: Calling `slides::download(url, dest_dir, progress)` with a URL whose string does not contain "slideshare.net" (e.g. a YouTube link, a slide-host.com link, or a typo like "slideshare.com").
Common situations: Pasting a link from another slide service; typos in the domain; mobile share-links (e.g. slideshare.app.goo.gl shorteners) that don't literally contain the domain; passing a slide ID instead of a URL.
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
- a API oficial so aceita URLs publicas (https://…) para os…
- cole a URL de um .m3u8 ou .mpd
- nao reconheci um perfil do X em
- nao reconheci um perfil do X em
- nao reconheci um post do X em
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/b9306b204e5f84ea.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/slides.rs:88
.args(["-y", "-hide_banner", "-loglevel", "error", "-i"])
.arg(&input)
.args(["-q:v", "2"])
.arg(&output)
.output()
.await?;
if !o.status.success() {
return Err(anyhow!("ffmpeg nao converteu a imagem {}", idx));
}
Ok(tokio::fs::read(&output).await?)
}
pub async fn download(
url: &str,
dest_dir: &str,
progress: super::ProgressFn,
) -> anyhow::Result<SlidesResult> {
if !url.contains("slideshare.net") {
return Err(anyhow!("cole um link do slideshare.net"));
}
let client = super::client()?;
let html = client
.get(url)
.send()
.await?
.error_for_status()?
.text()
.await?;
let urls = parse_slide_urls(&html);
if urls.is_empty() {
return Err(anyhow!("nao encontrei slides nessa pagina (o SlideShare pode ter mudado o HTML ou o deck e privado)"));
}
let title = og_title(&html).unwrap_or_else(|| "slideshare".to_string());
let work = super::temp_dir().join(format!("slides-{}", uuid::Uuid::new_v4()));
std::fs::create_dir_all(&work)?;
let mut images = Vec::with_capacity(urls.len());
let id = format!("slides:{}", url);View on GitHub (pinned to 8600b91f42)