{"record":{"id":"196df8c547de2f9a","repo":"ytdl-org/youtube-dl","slug":"youku-said-sorry-this-video-is-private","errorCode":null,"errorMessage":"Youku said: Sorry, this video is private","messagePattern":"Youku said: Sorry, this video is private","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/youku.py","lineNumber":183,"sourceCode":"            basic_data_params['password'] = video_password\n\n        headers = {\n            'Referer': url,\n        }\n        headers.update(self.geo_verification_headers())\n        data = self._download_json(\n            'https://ups.youku.com/ups/get.json', video_id,\n            'Downloading JSON metadata',\n            query=basic_data_params, headers=headers)['data']\n\n        error = data.get('error')\n        if error:\n            error_note = error.get('note')\n            if error_note is not None and '因版权原因无法观看此视频' in error_note:\n                raise ExtractorError(\n                    'Youku said: Sorry, this video is available in China only', expected=True)\n            elif error_note and '该视频被设为私密' in error_note:\n                raise ExtractorError(\n                    'Youku said: Sorry, this video is private', expected=True)\n            else:\n                msg = 'Youku server reported error %i' % error.get('code')\n                if error_note is not None:\n                    msg += ': ' + error_note\n                raise ExtractorError(msg)\n\n        # get video title\n        video_data = data['video']\n        title = video_data['title']\n\n        formats = [{\n            'url': stream['m3u8_url'],\n            'format_id': self.get_format_name(stream.get('stream_type')),\n            'ext': 'mp4',\n            'protocol': 'm3u8_native',\n            'filesize': int(stream.get('size')),\n            'width': stream.get('width'),","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/youku.py#L165-L201","documentation":"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.","triggerScenarios":"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 '该视频被设为私密'.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    info = ydl.extract_info(youku_url)\nexcept ExtractorError as e:\n    if 'this video is private' in str(e):\n        skip_or_log(youku_url)  # owner-privated video; not retryable\n    else:\n        raise","preventionTips":["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."],"tags":["youku","extractor","private-video","expected-error"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}