tonhowtf/omniget · error
No media URL available
Error message
No media URL available
What it means
download builds the output file from the first entry of info.available_qualities. If that list is empty (Pinterest HTML yielded no video/image URL), first() is None and this error is thrown. It indicates extraction succeeded structurally but produced no downloadable media URL.
Solutions
- Check available_qualities.is_empty() before calling download and surface a clearer 'no extractable media' message.
- Update the video/image extraction patterns (extract_video_url / image extraction) against current Pinterest HTML.
- Inspect the fetched HTML manually for the pin to see which extraction pattern needs updating.
- Try alternative extraction sources (Pinterest's JSON-LD, oEmbed, or __NEXT_DATA__ blob) when regex extraction fails.
Example fix
// before
let quality = info
.available_qualities
.first()
.ok_or_else(|| anyhow!("No media URL available"))?;
// after
let quality = info
.available_qualities
.iter()
.find(|q| !q.url.is_empty())
.ok_or_else(|| anyhow!("No media URL available for '{}' (extraction found no downloadable media)", info.title))?; Defensive patterns
Strategy: validation
Validate before calling
// Rust: verify extractable media before downloading
if info.available_qualities.is_empty()
|| info.available_qualities.iter().all(|q| q.url.is_empty()) {
return Err(anyhow!("pin has no downloadable media"));
} Try / catch
match download(opts).await {
Err(e) if e.to_string().contains("No media URL available") => {
eprintln!("Pin contains no downloadable video/image; extractor may be outdated");
}
other => other?,
} Prevention
- Alert on extraction success-rate drops (Pinterest markup changes break regexes silently)
- Extract from multiple sources (og: tags, JSON-LD, __NEXT_DATA__) with fallbacks
- Add regression tests with captured pin HTML fixtures refreshed periodically
- Skip pins whose media types are unsupported and report them distinctly
When it happens
Trigger: download() is called on a MediaInfo whose available_qualities is empty — media extraction found no video or image URL in the pin's HTML (e.g. story pins, GIF-only content, or extraction regex/pattern mismatch after a Pinterest markup change).
Common situations: Pinterest changed its HTML/JSON structure so extractors silently return nothing; pin contains only unsupported media types; fetch returned a shell page requiring JS rendering; pin is age-restricted with media hidden.
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
- No media found in pin
- o Pinterest nao devolveu esse pin
- board nao encontrado
- perfil nao encontrado
- HTTP ao acessar pin
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/4ca632ce803cc97a.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/src/platforms/pinterest/mod.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)