{"record":{"id":"1e34dea8aed830c8","repo":"ytdl-org/youtube-dl","slug":"this-video-is-not-available-from-your-country","errorCode":null,"errorMessage":"This video is not available from your country.","messagePattern":"This video is not available from your country\\.","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/mtv.py","lineNumber":77,"sourceCode":"        # Otherwise we get a webpage that would execute some javascript\n        req.add_header('User-Agent', 'curl/7')\n        webpage = self._download_webpage(req, mtvn_id,\n                                         'Downloading mobile page')\n        metrics_url = unescapeHTML(self._search_regex(r'<a href=\"(http://metrics.+?)\"', webpage, 'url'))\n        req = HEADRequest(metrics_url)\n        response = self._request_webpage(req, mtvn_id, 'Resolving url')\n        url = response.geturl()\n        # Transform the url to get the best quality:\n        url = re.sub(r'.+pxE=mp4', 'http://mtvnmobile.vo.llnwd.net/kip0/_pxn=0+_pxK=18639+_pxE=mp4', url, 1)\n        return [{'url': url, 'ext': 'mp4'}]\n\n    def _extract_video_formats(self, mdoc, mtvn_id, video_id):\n        if re.match(r'.*/(error_country_block\\.swf|geoblock\\.mp4|copyright_error\\.flv(?:\\?geo\\b.+?)?)$', mdoc.find('.//src').text) is not None:\n            if mtvn_id is not None and self._MOBILE_TEMPLATE is not None:\n                self.to_screen('The normal version is not available from your '\n                               'country, trying with the mobile version')\n                return self._extract_mobile_video_formats(mtvn_id)\n            raise ExtractorError('This video is not available from your country.',\n                                 expected=True)\n\n        formats = []\n        for rendition in mdoc.findall('.//rendition'):\n            if rendition.get('method') == 'hls':\n                hls_url = rendition.find('./src').text\n                formats.extend(self._extract_m3u8_formats(\n                    hls_url, video_id, ext='mp4', entry_protocol='m3u8_native',\n                    m3u8_id='hls', fatal=False))\n            else:\n                # fms\n                try:\n                    _, _, ext = rendition.attrib['type'].partition('/')\n                    rtmp_video_url = rendition.find('./src').text\n                    if 'error_not_available.swf' in rtmp_video_url:\n                        raise ExtractorError(\n                            '%s said: video is not available' % self.IE_NAME,\n                            expected=True)","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/mtv.py#L59-L95","documentation":"Raised by MTV's _extract_video_formats when the mediagen XML rendition source URL ends in error_country_block.swf, geoblock.mp4, or copyright_error.flv. It signals a geographic or copyright block; the extractor first tries the mobile template fallback, and only if that is unavailable does it raise this expected error.","triggerScenarios":"Extracting an MTV/paramount network video whose mediagen doc's <src> matches the geoblock/copyright error pattern, when the specific subclass has no _MOBILE_TEMPLATE or mtvn_id fallback available.","commonSituations":"Downloading Comedy Central / MTV / Nickelodeon clips from outside the US; content withdrawn for copyright reasons; corporate networks egressed through foreign IPs triggering geo detection.","solutions":["Retry with a proxy/VPN in an allowed region: --proxy <url> (or --geo-verify-proxy to auto-find one).","If the block is copyright_error (not geo), the content is withdrawn — obtain it from the rights holder's official channel.","Update youtube-dl; newer builds may have better mobile-template fallbacks for the specific sub-site."],"exampleFix":"# before\nyoutube-dl https://www.cc.com/video/...\n\n# after\nyoutube-dl --geo-verify-proxy https://www.cc.com/video/...","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"except ExtractorError as e:\n    if 'not available from your country' in str(e):\n        retry_with_proxy(url, region='US')  # mobile fallback already failed\n    else:\n        raise","preventionTips":["Run MTV-family jobs with --geo-verify-proxy from the start when egressing outside the US.","Distinguish copyright_error from country blocks — the former is not fixable by proxy.","Keep a pool of US proxies and retry geo-blocked URLs through them once."],"tags":["geo-restriction","copyright","extractor","expected-error"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}