ytdl-org/youtube-dl · error · ExtractorError
Youku said: Sorry, this video is private
Error message
Youku said: Sorry, this video is private
What it means
Raised by YoukuIE._real_extract when the ups.youku.com UPS JSON response contains an error whose note includes the Chinese string '该视频被设为私密' (this video was set to private). It is an expected=True ExtractorError, meaning the video exists but the uploader made it private, so no formats can be retrieved. youtube-dl marks it expected so it is reported as a user-facing extraction failure rather than a bug.
Source
Thrown at youtube_dl/extractor/youku.py:183
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',
'protocol': 'm3u8_native',
'filesize': int(stream.get('size')),
'width': stream.get('width'),View on GitHub (pinned to 956b8c5855)
Solutions
- Verify the video opens in a browser while logged in as the owner — if it 403s/privates there, the error is correct and the video simply cannot be downloaded anonymously.
- If you own the video, change its privacy setting on Youku back to public and retry.
- If a playlist crawl, catch this expected error per-entry and skip the private item instead of aborting the whole playlist.
- If the video is public in a browser but the error persists, the note-matching heuristic may have drifted — compare the raw error note and update the substring match in youtube_dl/extractor/youku.py.
Defensive patterns
Strategy: try-catch
Try / catch
try:
info = ydl.extract_info(youku_url)
except ExtractorError as e:
if 'this video is private' in str(e):
skip_or_log(youku_url) # owner-privated video; not retryable
else:
raise Prevention
- Curate link lists before bulk downloads; private Youku videos can never be fetched anonymously.
- Treat expected=True extractor errors as skip signals in playlist crawls rather than aborting the run.
When it happens
Trigger: Calling the extractor on a Youku URL whose video the owner has set to private; the API call to https://ups.youku.com/ups/get.json returns data.error with note containing '该视频被设为私密'.
Common situations: Old bookmarked/shared Youku links whose owners later privated the video; crawling playlist entries where some members are private; testing with stale video IDs from unit tests or documentation.
Related errors
- %s said: %s
- Video %s is for friends only
- %s said: %s
- This video is not available from your country.
- %s said: video is not available
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/196df8c547de2f9a.
Report an issue: GitHub.