ytdl-org/youtube-dl · error · ExtractorError

This video is not available in your region.

Error message

This video is not available in your region.

What it means

Thrown by the OTT-flavored Viu extractor when the country-specific index.php endpoint returns data lacking a 'current_product' entry for the requested video. The extractor maps the URL's country code to an area_id and expects product_data['current_product'] to exist; its absence means the title is unavailable for that market. Marked expected=True.

Source

Thrown at youtube_dl/extractor/viu.py:224

        country_code, video_id = re.match(self._VALID_URL, url).groups()

        query = {
            'r': 'vod/ajax-detail',
            'platform_flag_label': 'web',
            'product_id': video_id,
        }

        area_id = self._AREA_ID.get(country_code.upper())
        if area_id:
            query['area_id'] = area_id

        product_data = self._download_json(
            'http://www.viu.com/ott/%s/index.php' % country_code, video_id,
            'Downloading video info', query=query)['data']

        video_data = product_data.get('current_product')
        if not video_data:
            raise ExtractorError('This video is not available in your region.', expected=True)

        stream_data = self._download_json(
            'https://d1k2us671qcoau.cloudfront.net/distribute_web_%s.php' % country_code,
            video_id, 'Downloading stream info', query={
                'ccs_product_id': video_data['ccs_product_id'],
            }, headers={
                'Referer': url,
                'Origin': re.search(r'https?://[^/]+', url).group(0),
            })['data']['stream']

        stream_sizes = stream_data.get('size', {})
        formats = []
        for vid_format, stream_url in stream_data.get('url', {}).items():
            height = int_or_none(self._search_regex(
                r's(\d+)p', vid_format, 'height', default=None))
            formats.append({
                'format_id': vid_format,
                'url': stream_url,

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Use the URL for a country where the title is actually licensed (match the /<lang>/ or country segment of the URL)
  2. Connect from an IP in that licensed market so the OTT endpoint returns the product
  3. Verify the video ID exists on the viu.com website in that region first
Defensive patterns

Strategy: validation

Validate before calling

# Pre-check: is this market supported and product present?
import requests
r = requests.get('http://www.viu.com/ott/%s/index.php' % country_code,
                 params=query, timeout=10)
if not r.json().get('data', {}).get('current_product'):
    skip('Not available in region %s' % country_code)

Try / catch

from youtube_dl.utils import ExtractorError
try:
    ydl.extract_info(url)
except ExtractorError as e:
    if 'not available in your region' in str(e):
        queue_for_proxy_retry(url)
    else:
        raise

Prevention

When it happens

Trigger: Calling http://www.viu.com/ott/<country>/index.php with the video's query params from a region where the show is not distributed, so the returned data dict has no 'current_product' key.

Common situations: Extracting a drama URL with an unsupported market code (area_id lookup fails or the product simply isn't offered there); using a VPN exit country that differs from the URL's country segment.

Related errors


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