tonhowtf/omniget · error
No media found in post
Error message
No media found in post
What it means
extract_media_from_gql walks a successfully fetched GQL media node looking, in order, for edge_sidecar_to_children (carousel), video_url, and display_url. This error is thrown when the media node exists but none of those fields yield a usable URL — the JSON shape is recognized as a post but contains no downloadable media.
Solutions
- Dump the media node JSON when this fires and add handling for any new field names (Instagram occasionally renames display_url/video_url).
- Check whether the node has an edge_media_to_caption/owner but no media fields, which indicates an auth-stripped response — consider supplying cookies.
- Ensure carousel edges with missing video_url/display_url don't silently empty the items vec; log filtered-out edges.
- Fall back to the embed extractor or fallback_ytdlp for posts the GQL parser can't handle.
Defensive patterns
Strategy: fallback
Validate before calling
// Rust: verify the GQL node carries at least one known media field
fn gql_node_has_media(node: &serde_json::Value) -> bool {
node.get("edge_sidecar_to_children").is_some()
|| node.get("video_url").is_some()
|| node.get("display_url").is_some()
} Type guard
fn as_media_url(v: &serde_json::Value) -> Option<&str> {
v.as_str().filter(|s| s.starts_with("http"))
} Try / catch
match extract_media_from_gql(&node) {
Ok(media) => media,
Err(e) if e.to_string().contains("No media found in post") => {
// node shape unrecognized; try embed extraction or yt-dlp
fallback_extract(url).await
}
Err(e) => return Err(e.into()),
} Prevention
- Log the full media node when extraction fails to catch schema drift
- Treat missing display_url/video_url as a signal of auth-stripped responses
- Filter carousel edges defensively and log skipped nodes
- Keep an independent extractor (yt-dlp) as backup
When it happens
Trigger: A GQL xdt_shortcode_media node that has no edge_sidecar_to_children.edges with resolvable node.video_url/display_url, no top-level video_url, and no top-level display_url — e.g. a media node returned in a degraded/error state, or an unsupported media type.
Common situations: See trigger scenarios.
Related errors
- No media found in embed
- empty stream url
- download falhou: HTTP
- nao achei os arquivos JSON de seguidores no export. No…
- e.to_string()
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/07910499e3e977de.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/platforms/instagram.rs:547
}
}
}
if let Some(video_url) = data.get("video_url").and_then(|v| v.as_str()) {
return Ok(InstagramMedia::Single {
url: video_url.to_string(),
is_video: true,
});
}
if let Some(display_url) = data.get("display_url").and_then(|v| v.as_str()) {
return Ok(InstagramMedia::Single {
url: display_url.to_string(),
is_video: false,
});
}
Err(anyhow!("No media found in post"))
}
fn instagram_headers() -> reqwest::header::HeaderMap {
let mut headers = reqwest::header::HeaderMap::new();
headers.insert(
reqwest::header::REFERER,
"https://www.instagram.com/".parse().unwrap(),
);
headers.insert(
reqwest::header::ORIGIN,
"https://www.instagram.com".parse().unwrap(),
);
headers
}
fn post_url_from_title(title: &str) -> Option<String> {
let post_id = title.strip_prefix("instagram_")?;
if post_id.is_empty() {View on GitHub (pinned to 8600b91f42)