ytdl-org/youtube-dl · error · ExtractorError
Youku said: Sorry, this video is available in China only
Error message
Youku said: Sorry, this video is available in China only
What it means
Raised by the Youku extractor when the ups.youku.com/get.json API returns an error whose note contains '因版权原因无法观看此视频' ('this video cannot be viewed for copyright reasons'). Youku licenses much of its catalog for mainland China only, so foreign IPs get this copyright/geo error.
Source
Thrown at youtube_dl/extractor/youku.py:180
video_password = self._downloader.params.get('videopassword')
if video_password:
basic_data_params['password'] = video_password
headers = {
'Referer': url,
}
headers.update(self.geo_verification_headers())
data = self._download_json(
'https://ups.youku.com/ups/get.json', video_id,
'Downloading JSON metadata',
query=basic_data_params, headers=headers)['data']
error = data.get('error')
if error:
error_note = error.get('note')
if error_note is not None and '因版权原因无法观看此视频' in error_note:
raise ExtractorError(
'Youku said: Sorry, this video is available in China only', expected=True)
elif error_note and '该视频被设为私密' in error_note:
raise ExtractorError(
'Youku said: Sorry, this video is private', expected=True)
else:
msg = 'Youku server reported error %i' % error.get('code')
if error_note is not None:
msg += ': ' + error_note
raise ExtractorError(msg)
# get video title
video_data = data['video']
title = video_data['title']
formats = [{
'url': stream['m3u8_url'],
'format_id': self.get_format_name(stream.get('stream_type')),
'ext': 'mp4',View on GitHub (pinned to 956b8c5855)
Solutions
- Route through a mainland-China IP (the content is licensed for CN only).
- If already in China, ensure no proxy/VPN is intercepting the request.
- Find the title on an international service if one holds your region's rights.
Defensive patterns
Strategy: try-catch
Try / catch
try:
info = ydl.extract_info(url)
except GeoRestrictedError:
mark_geo_blocked(url, countries=['CN'])
except ExtractorError as e:
if 'available in China only' in str(e):
mark_geo_blocked(url, countries=['CN'])
else:
raise Prevention
- Route Youku traffic through a mainland-China IP.
- Check that no VPN/proxy leaks a foreign IP — geo detection happens server-side at ups.youku.com.
- Distinguish this copyright error from the sibling 'private video' error; only the latter is unfixable by region.
When it happens
Trigger: Downloading any Youku video while ups.youku.com returns data.error with a note containing the Chinese copyright string; the check runs before title extraction, after the JSON metadata request with geo verification headers.
Common situations: Accessing Youku shows/movies from outside mainland China; VPNs exiting in non-CN regions; content whose China-only license is actively enforced.
Related errors
- %s (site code %d)
- info['errorMsg']
- %s returned error: %s
- %s said: %s
- This content is not available at your territory due to limit
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/dd553adcfc691d28.
Report an issue: GitHub.