ytdl-org/youtube-dl · error · ExtractorError

This content is not available at your territory due to limit

Error message

This content is not available at your territory due to limited copyright.

What it means

Raised by CeskaTelevizeIE when the playlist API JSON returns url == 'error_region' for the requested playlist. This is the backend's way of saying the content is licensed only for the Czech Republic (or Czech+Slovak), and the extractor maps it to a geo-restriction error with the standard message (expected=True).

Source

Thrown at youtube_dl/extractor/ceskatelevize.py:194

            req = sanitized_Request(
                'https://www.ceskatelevize.cz/ivysilani/ajax/get-client-playlist/',
                data=urlencode_postdata(data))

            req.add_header('Content-type', 'application/x-www-form-urlencoded')
            req.add_header('x-addr', '127.0.0.1')
            req.add_header('X-Requested-With', 'XMLHttpRequest')
            if user_agent:
                req.add_header('User-Agent', user_agent)
            req.add_header('Referer', url)

            playlistpage = self._download_json(req, playlist_id, fatal=False)

            if not playlistpage:
                continue

            playlist_url = playlistpage['url']
            if playlist_url == 'error_region':
                raise ExtractorError(NOT_AVAILABLE_STRING, expected=True)

            req = sanitized_Request(compat_urllib_parse_unquote(playlist_url))
            req.add_header('Referer', url)

            playlist = self._download_json(req, playlist_id, fatal=False)
            if not playlist:
                continue

            playlist = playlist.get('playlist')
            if not isinstance(playlist, list):
                continue

            playlist_len = len(playlist)

            for num, item in enumerate(playlist):
                is_live = item.get('type') == 'LIVE'
                formats = []
                for format_id, stream_url in item.get('streamUrls', {}).items():

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Use a Czech proxy/VPN: youtube-dl --proxy http://cz-proxy:8080 URL.
  2. Note some programs are CZ-only while others allow SK — check the show's licensing note on the website.
  3. Update to yt-dlp, which keeps the CT geo handling current.
  4. If already in CZ and still failing, verify the exit IP geolocates to CZ (GeoRestrictedError's .countries lists allowed ones).

Example fix

try:
    ydl.extract(ct_url)
except GeoRestrictedError as e:
    print('allowed countries:', e.countries)
    ydl.extract(ct_url, proxy='http://cz-proxy:8080')  # via YoutubeDL opts
Defensive patterns

Strategy: retry

Try / catch

from youtube_dl.utils import GeoRestrictedError
try:
    ydl.extract_info(url)
except GeoRestrictedError as e:
    print('region locked, allowed:', e.countries)
    YoutubeDL({'proxy': cz_proxy}).extract_info(url)

Prevention

When it happens

Trigger: Requesting a region-locked Ceska televize playlist (the 'playlistProgram' API) from an IP outside the licensed territory. Every available playlist candidate returning error_region triggers the raise.

Common situations: Users outside CZ/SK downloading Czech TV archives; VPNs that exit in unsupported countries; some content restricted to CZ only even for SK users.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/46560c7e79c14cf4. Report an issue: GitHub.