{"record":{"id":"ca0c768ed86d208a","repo":"tonhowtf/omniget","slug":"video-restricted-in-your-region","errorCode":null,"errorMessage":"Video restricted in your region.","messagePattern":"Video restricted in your region\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":4477,"sourceCode":"            \"yt-dlp extractor is broken for this site. Update yt-dlp in Settings → Dependencies, then retry.\"\n        );\n    }\n    if lower.contains(\"requested format\") && lower.contains(\"not available\") {\n        return anyhow!(\n            \"Requested format is not available. The download will retry with a compatible format.\"\n        );\n    }\n    if lower.contains(\"video unavailable\") || lower.contains(\"not available\") {\n        return anyhow!(\"Video unavailable or removed.\");\n    }\n    if lower.contains(\"private video\") {\n        return anyhow!(\"This video is private.\");\n    }\n    if lower.contains(\"copyright\") {\n        return anyhow!(\"Video blocked due to copyright.\");\n    }\n    if lower.contains(\"geo\") && lower.contains(\"block\") {\n        return anyhow!(\"Video restricted in your region.\");\n    }\n    if lower.contains(\"timed out\") || lower.contains(\"timeout\") {\n        return anyhow!(\"Connection timed out. Check your internet and try again.\");\n    }\n    if lower.contains(\"ffmpeg\") && (lower.contains(\"not found\") || lower.contains(\"no such file\")) {\n        return anyhow!(\"FFmpeg not found. Install FFmpeg to download this format.\");\n    }\n    if lower.contains(\"unsupported url\") || lower.contains(\"no suitable infojson\") {\n        return anyhow!(\"Unsupported URL. Check that the link is correct.\");\n    }\n    if lower.contains(\"unable to download\") && lower.contains(\"webpage\") {\n        return anyhow!(\"Failed to access the page. Check the link and your connection.\");\n    }\n    if lower.contains(\"is not a valid url\") || lower.contains(\"no video formats\") {\n        return anyhow!(\"No video formats found for this link.\");\n    }\n\n    let last_error_line = stderr","sourceCodeStart":4459,"sourceCodeEnd":4495,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L4459-L4495","documentation":"translate_ytdlp_error at ytdlp.rs:4477 maps stderr containing both 'geo' and 'block' to this message. The host serves a geographic restriction error — the video is licensed only for specific countries and the current exit IP is outside them. The library throws it to distinguish geo-blocks from removals or privacy blocks.","triggerScenarios":"yt-dlp stderr contains 'geo' together with 'block' — e.g. 'This video is not available in your country' / 'geo-blocked' / 'geo-restricted' responses during extraction.","commonSituations":"Downloading broadcaster/iPlayer-style region-locked content from another continent; YouTube music videos licensed per-territory; running on a datacenter/VPN IP registered in an unsupported country.","solutions":["Route the request through a network/proxy located in a supported region, if you have legitimate access.","Import cookies from an account in a permitted region (some platforms honor account region).","Confirm the video truly is region-locked by checking its availability in a browser.","Check for a region-free mirror or official alternative source."],"exampleFix":"// before: direct request from an unsupported region\nrun_ytdlp(&[\"-f\", \"best\", geo_locked_url])?;\n\n// after: use a region-appropriate proxy\nrun_ytdlp(&[\"--proxy\", \"http://proxy-in-supported-region:8080\", \"-f\", \"best\", geo_locked_url])?;","handlingStrategy":"fallback","validationCode":"// Detect geo-block notices before starting the download\nconst html = await (await fetch(url)).text();\nif (/not available in your (country|region)|geo-?block/i.test(html)) throw new Error('Geo-blocked: route via a supported region first.');","typeGuard":null,"tryCatchPattern":"try {\n  await download(url);\n} catch (e) {\n  if (isGeoBlocked(e)) await downloadViaProxy(url, supportedRegionProxy); // fallback route\n  else throw e;\n}","preventionTips":["Configure a region-appropriate proxy for region-locked sources you legitimately access","Use account cookies from a supported region when the platform honors account region","Check availability per-region before scheduling downloads"],"tags":["ytdlp","geo-blocking","region","extraction"],"backgroundTag":"permission-denied","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"}