tonhowtf/omniget · error
No media URL available
Error message
No media URL available
What it means
download() takes the first entry of MediaInfo.available_qualities as the media URL to stream. If that list is empty, there is no URL to download and this error is raised. It usually means get_media_info parsed the pin's HTML but found no media assets.
Solutions
- Re-run get_media_info to get fresh MediaInfo before downloading
- Check the pin in a browser — if it has no direct media, the error is expected
- Update/extend the video/image extraction logic to match current Pinterest HTML
- Reject the pin earlier with a clearer error in get_media_info when no assets are found
Example fix
// before
let quality = info.available_qualities.first()
.ok_or_else(|| anyhow!("No media URL available"))?;
// after
let quality = info.available_qualities.first().with_context(||
format!("no media URL available for pin (qualities: {:?})", info.available_qualities.len()))?; Defensive patterns
Strategy: validation
Validate before calling
fn has_media(info: &MediaInfo) -> bool {
!info.available_qualities.is_empty()
} Try / catch
if !has_media(&info) {
return Err(anyhow!("pin has no downloadable media — check it in a browser"));
}
platform.download(opts).await?; Prevention
- Call get_media_info immediately before download; never reuse stale MediaInfo
- Verify the pin actually contains media before attempting download
- Keep extractors updated against current Pinterest markup
- Surface empty quality lists earlier with a clearer error at get_media_info time
When it happens
Trigger: Downloading a pin whose available_qualities is empty — e.g. the HTML contained no extractable video/image URL, extraction regexes missed the current Pinterest page format, or the pin is an idea/story pin type not handled.
Common situations: Pinterest changes its HTML/JSON embed format breaking extractors; pin contains only external links; private or age-restricted media that renders an empty page for the scraper; stale cached MediaInfo.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- nenhum favorito foi lido: esses perfis costumam exigir a…
- nenhum post foi lido desse blog
- No downloadable media found for this tweet (it may be…
- o Pinterest nao devolveu esse pin
- board nao encontrado
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/b317145676f779d3.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/platforms/pinterest.rs:235
opts.filename_template.as_deref(),
opts.referer
.as_deref()
.or(Some("https://www.pinterest.com/")),
opts.cancel_token.clone(),
None,
opts.concurrent_fragments,
false,
&[],
opts.audio_format.as_deref(),
)
.await;
}
}
let quality = info
.available_qualities
.first()
.ok_or_else(|| anyhow!("No media URL available"))?;
let extension = &quality.format;
let filename = format!("{}.{}", info.title, extension);
let safe_filename = sanitize_filename::sanitize(&filename);
let output_path = opts.output_dir.join(&safe_filename);
let total_bytes = direct_downloader::download_direct(
&self.client,
&quality.url,
&output_path,
progress,
Some(&opts.cancel_token),
)
.await?;
Ok(DownloadResult {
file_path: output_path,
file_size_bytes: total_bytes,View on GitHub (pinned to 8600b91f42)