ytdl-org/youtube-dl · error · ExtractorError
This video is not available from your country.
Error message
This video is not available from your country.
What it means
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.
Source
Thrown at youtube_dl/extractor/mtv.py:77
# Otherwise we get a webpage that would execute some javascript
req.add_header('User-Agent', 'curl/7')
webpage = self._download_webpage(req, mtvn_id,
'Downloading mobile page')
metrics_url = unescapeHTML(self._search_regex(r'<a href="(http://metrics.+?)"', webpage, 'url'))
req = HEADRequest(metrics_url)
response = self._request_webpage(req, mtvn_id, 'Resolving url')
url = response.geturl()
# Transform the url to get the best quality:
url = re.sub(r'.+pxE=mp4', 'http://mtvnmobile.vo.llnwd.net/kip0/_pxn=0+_pxK=18639+_pxE=mp4', url, 1)
return [{'url': url, 'ext': 'mp4'}]
def _extract_video_formats(self, mdoc, mtvn_id, video_id):
if re.match(r'.*/(error_country_block\.swf|geoblock\.mp4|copyright_error\.flv(?:\?geo\b.+?)?)$', mdoc.find('.//src').text) is not None:
if mtvn_id is not None and self._MOBILE_TEMPLATE is not None:
self.to_screen('The normal version is not available from your '
'country, trying with the mobile version')
return self._extract_mobile_video_formats(mtvn_id)
raise ExtractorError('This video is not available from your country.',
expected=True)
formats = []
for rendition in mdoc.findall('.//rendition'):
if rendition.get('method') == 'hls':
hls_url = rendition.find('./src').text
formats.extend(self._extract_m3u8_formats(
hls_url, video_id, ext='mp4', entry_protocol='m3u8_native',
m3u8_id='hls', fatal=False))
else:
# fms
try:
_, _, ext = rendition.attrib['type'].partition('/')
rtmp_video_url = rendition.find('./src').text
if 'error_not_available.swf' in rtmp_video_url:
raise ExtractorError(
'%s said: video is not available' % self.IE_NAME,
expected=True)View on GitHub (pinned to 956b8c5855)
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.
Example fix
# before youtube-dl https://www.cc.com/video/... # after youtube-dl --geo-verify-proxy https://www.cc.com/video/...
Defensive patterns
Strategy: fallback
Try / catch
except ExtractorError as e:
if 'not available from your country' in str(e):
retry_with_proxy(url, region='US') # mobile fallback already failed
else:
raise Prevention
- 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.
When it happens
Trigger: 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.
Common situations: Downloading Comedy Central / MTV / Nickelodeon clips from outside the US; content withdrawn for copyright reasons; corporate networks egressed through foreign IPs triggering geo detection.
Related errors
- %s said: video is not available
- %s returned error: %s - %s
- %s: No songs found, try using proxy
- %s (site code %d)
- %s returned error: %s
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/1e34dea8aed830c8.
Report an issue: GitHub.