{"record":{"id":"ed87f8969e7056ce","repo":"ytdl-org/youtube-dl","slug":"the-video-can-t-be-downloaded","errorCode":null,"errorMessage":"The video can't be downloaded","messagePattern":"The video can't be downloaded","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/niconico.py","lineNumber":430,"sourceCode":"\n            if error_code == 'DELETED':\n                raise ExtractorError('The video has been deleted.',\n                                     expected=True)\n            elif error_code == 'NOT_FOUND':\n                raise ExtractorError('The video is not found.',\n                                     expected=True)\n            elif error_code == 'COMMUNITY':\n                self.to_screen('%s: The video is community members only.' % video_id)\n            else:\n                raise ExtractorError('%s reports error: %s' % (self.IE_NAME, error_code))\n\n        # Start extracting video formats\n        formats = []\n\n        # Get HTML5 videos info\n        quality_info = try_get(api_data, lambda x: x['media']['delivery']['movie'])\n        if not quality_info:\n            raise ExtractorError('The video can\\'t be downloaded', expected=True)\n\n        for audio_quality in quality_info.get('audios') or {}:\n            for video_quality in quality_info.get('videos') or {}:\n                if not audio_quality.get('isAvailable') or not video_quality.get('isAvailable'):\n                    continue\n                formats.append(self._extract_format_for_quality(\n                    api_data, video_id, audio_quality, video_quality))\n\n        # Get flv/swf info\n        timestamp = None\n        video_real_url = try_get(api_data, lambda x: x['video']['smileInfo']['url'])\n        if video_real_url:\n            is_economy = video_real_url.endswith('low')\n\n            if is_economy:\n                self.report_warning('Site is currently in economy mode! You will only have access to lower quality streams')\n\n            # Invoking ffprobe to determine resolution","sourceCodeStart":412,"sourceCodeEnd":448,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/niconico.py#L412-L448","documentation":"Raised by NiconicoIE when api_data['media']['delivery']['movie'] is missing or falsy — the HTML5 DMC delivery section that carries all quality metadata is absent from the watch-page API payload. Without it no formats can be built. Marked expected=True, it typically means the video has no web-deliverable streams for this session.","triggerScenarios":"try_get(api_data, lambda x: x['media']['delivery']['movie']) returns None on a watch page, e.g. economy/premium-gated delivery, logged-out access to member videos, or payload shape changes.","commonSituations":"Watching-restricted or member-only videos without a logged-in session; region/session gating on delivery; API changes after the extractor's last update (update first).","solutions":["Update youtube-dl / yt-dlp — delivery payload changes are frequent on Niconico.","Pass an authenticated session: --cookies-from-browser <browser> or --cookies <cookie-file>; many missing-delivery cases are session gating.","If the DMC delivery is genuinely absent (e.g. very old SWF-only videos), the extractor's smile/FLV path elsewhere handles only some of these — some legacy videos are simply not downloadable."],"exampleFix":"# before\nyoutube-dl 'https://www.nicovideo.jp/watch/sm9'\n\n# after\nyoutube-dl --cookies-from-browser chrome 'https://www.nicovideo.jp/watch/sm9'","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"except ExtractorError as e:\n    if e.expected and \"can't be downloaded\" in str(e):\n        retry(url, cookies=fresh_niconico_cookies())  # session gating is common\n    else:\n        raise","preventionTips":["Always pass cookies for Niconico — delivery payloads are session-dependent.","Update yt-dlp first; DMC payload structure changes frequently.","Accept that some legacy SWF-era videos have no web delivery at all."],"tags":["niconico","authentication","delivery","extractor","expected-error"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}