{"record":{"id":"4390a16f30c956e9","repo":"tonhowtf/omniget","slug":"instagram-stories-are-not-supported-only-public-posts-reels","errorCode":null,"errorMessage":"Instagram Stories are not supported. Only public posts, reels and carousels.","messagePattern":"Instagram Stories are not supported\\. Only public posts, reels and carousels\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/platforms/instagram.rs","lineNumber":676,"sourceCode":"        \"instagram\"\n    }\n\n    fn can_handle(&self, url: &str) -> bool {\n        if let Ok(parsed) = url::Url::parse(url) {\n            if let Some(host) = parsed.host_str() {\n                let host = host.to_lowercase();\n                return host == \"instagram.com\"\n                    || host.ends_with(\".instagram.com\")\n                    || host == \"ddinstagram.com\"\n                    || host.ends_with(\".ddinstagram.com\");\n            }\n        }\n        false\n    }\n\n    async fn get_media_info(&self, url: &str) -> anyhow::Result<MediaInfo> {\n        if Self::is_story_url(url) {\n            return Err(anyhow!(\n                \"Instagram Stories are not supported. Only public posts, reels and carousels.\"\n            ));\n        }\n\n        let post_id = if let Some(share_id) = Self::extract_share_id(url) {\n            let resolved = self.resolve_share_link(&share_id).await?;\n            Self::extract_post_id(&resolved).ok_or_else(|| anyhow!(\"Could not extract post ID\"))?\n        } else {\n            Self::extract_post_id(url).ok_or_else(|| anyhow!(\"Could not extract post ID\"))?\n        };\n\n        let filename_base = format!(\"instagram_{}\", post_id);\n\n        let embed_result = self.request_embed(&post_id).await;\n        let media = match embed_result {\n            Ok(data) => Self::extract_media_from_embed(&data),\n            Err(_embed_err) => match self.request_gql(&post_id).await {\n                Ok(data) => Self::extract_media_from_gql(&data),","sourceCodeStart":658,"sourceCodeEnd":694,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/platforms/instagram.rs#L658-L694","documentation":"get_media_info explicitly rejects Instagram story URLs before any network work. is_story_url detects /stories/ path patterns, and when matched, the downloader refuses with a fixed message because stories require authentication and ephemeral API access that this platform implementation does not support.","triggerScenarios":"Calling get_media_info (or the download flow that routes URLs to PlatformDownloader::can_handle) with an Instagram URL containing a story path, e.g. https://www.instagram.com/stories/<user>/<id>/, or via ddinstagram mirrors of story links.","commonSituations":"User pastes a story link into the app expecting it to behave like a post; share links that redirect to a story; automation feeding arbitrary Instagram URLs without pre-filtering story paths.","solutions":["Don't pass story URLs to this downloader; filter them out in the caller.","Pre-validate the URL path (reject /stories/) in your own UI before invoking get_media_info.","For stories support, integrate an authenticated extraction path (e.g. yt-dlp with session cookies) instead of this platform handler.","Communicate the supported scope (public posts, reels, carousels) to end users."],"exampleFix":"// before\nlet info = downloader.get_media_info(url).await?;\n// after\nif url.contains(\"/stories/\") {\n    anyhow::bail!(\"Instagram Stories are not supported by this downloader\");\n}\nlet info = downloader.get_media_info(url).await?;","handlingStrategy":"validation","validationCode":"// Rust: reject story URLs before invoking the downloader\nfn is_story(url: &str) -> bool {\n    url::Url::parse(url).ok()\n        .and_then(|u| u.path().strip_prefix(\"/stories/\").map(|_| true))\n        .unwrap_or(false)\n}\nif is_story(url) { /* show 'stories unsupported' message, skip call */ }","typeGuard":null,"tryCatchPattern":"match downloader.get_media_info(url).await {\n    Err(e) if e.to_string().contains(\"Stories are not supported\") => {\n        ui.show_message(\"Instagram Stories are not supported; paste a post, reel or carousel link.\");\n    }\n    other => other?,\n}","preventionTips":["Filter /stories/ URLs in your own input validation layer","Document supported content types (posts, reels, carousels) in the UI","Normalize share links before dispatching so story redirects are caught early","Route story URLs to a separate authenticated extractor if stories support is needed"],"tags":["instagram","unsupported-feature","url-validation"],"backgroundTag":"unsupported-operation","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}