{"record":{"id":"127e42881a03a79b","repo":"tonhowtf/omniget","slug":"no-media-found-in-pin","errorCode":null,"errorMessage":"No media found in pin {}","messagePattern":"No media found in pin (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/platforms/pinterest.rs","lineNumber":324,"sourceCode":"            return Ok(MediaInfo {\n                title: format!(\"pinterest_{}\", pin_id),\n                author: String::new(),\n                platform: \"pinterest\".to_string(),\n                duration_seconds: None,\n                thumbnail_url: None,\n                available_qualities: vec![VideoQuality {\n                    label: \"original\".to_string(),\n                    width: 0,\n                    height: 0,\n                    url: image_url,\n                    format: format.to_string(),\n                }],\n                media_type,\n                file_size_bytes: None,\n            });\n        }\n\n        Err(anyhow!(\"No media found in pin {}\", pin_id))\n    }\n}\n","sourceCodeStart":306,"sourceCodeEnd":327,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/platforms/pinterest.rs#L306-L327","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Dump the fetched HTML and update the video/image extraction patterns to the current markup","Check whether the pin is a story/idea/carousel pin and add handling for that type","Try the Pinterest JSON/API endpoint embedded in the HTML (e.g. __PWS_DATA__) instead of regex on HTML","Render the page or add cookies so lazy-loaded media is present in the HTML"],"exampleFix":"// before\nErr(anyhow!(\"No media found in pin {}\", pin_id))\n// after\n#[derive(serde::Deserialize)]\nstruct PwsData { #[serde(rename = \"props\")] props: serde_json::Value }\n// parse embedded __PWS_DATA__ JSON first, fall back to HTML regex\nErr(anyhow!(\"No media found in pin {} (unsupported pin type or layout change)\", pin_id))","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match platform.get_media_info(url).await {\n    Err(e) if e.to_string().starts_with(\"No media found in pin\") => {\n        // try alternate extraction path (embedded JSON / rendered page) before giving up\n    }\n    other => other?,\n}","preventionTips":["Prefer parsing Pinterest's embedded __PWS_DATA__ JSON over HTML regex","Alert on this error rate — spikes indicate a Pinterest layout change","Support story/idea/carousel pin types explicitly","Fetch with cookies/JS-rendered HTML so lazy-loaded media is visible"],"tags":["pinterest","scraping","parsing","extraction","layout-change"],"backgroundTag":"unexpected-response-shape","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"}