tonhowtf/omniget · error

No media found in pin

Error message

No media found in pin {}

What it means

Final fallback of native_get_media_info(): the pin page was fetched and is not a not-found page, but neither video nor image extraction matched, so no MediaInfo could be built. This indicates the extractor's patterns no longer match the pin's HTML or the pin holds no downloadable media.

Solutions

  1. Dump the fetched HTML and update the video/image extraction patterns to the current markup
  2. Check whether the pin is a story/idea/carousel pin and add handling for that type
  3. Try the Pinterest JSON/API endpoint embedded in the HTML (e.g. __PWS_DATA__) instead of regex on HTML
  4. Render the page or add cookies so lazy-loaded media is present in the HTML

Example fix

// before
Err(anyhow!("No media found in pin {}", pin_id))
// after
#[derive(serde::Deserialize)]
struct PwsData { #[serde(rename = "props")] props: serde_json::Value }
// parse embedded __PWS_DATA__ JSON first, fall back to HTML regex
Err(anyhow!("No media found in pin {} (unsupported pin type or layout change)", pin_id))
Defensive patterns

Strategy: fallback

Try / catch

match platform.get_media_info(url).await {
    Err(e) if e.to_string().starts_with("No media found in pin") => {
        // try alternate extraction path (embedded JSON / rendered page) before giving up
    }
    other => other?,
}

Prevention

When it happens

Trigger: extract_video_url and image extraction both return None for the fetched HTML — e.g. idea/story pins, pins embedding external content only, or Pinterest markup changes that break the extraction regexes.

Common situations: Pinterest A/B tests new page layouts; scraper runs without a logged-in context so media is lazy-loaded via JS; the pin is a carousel or story format unsupported by the extractor.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/127e42881a03a79b. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/platforms/pinterest.rs:324

            return Ok(MediaInfo {
                title: format!("pinterest_{}", pin_id),
                author: String::new(),
                platform: "pinterest".to_string(),
                duration_seconds: None,
                thumbnail_url: None,
                available_qualities: vec![VideoQuality {
                    label: "original".to_string(),
                    width: 0,
                    height: 0,
                    url: image_url,
                    format: format.to_string(),
                }],
                media_type,
                file_size_bytes: None,
            });
        }

        Err(anyhow!("No media found in pin {}", pin_id))
    }
}

View on GitHub (pinned to 8600b91f42)