{"record":{"id":"699f985422028a1d","repo":"ytdl-org/youtube-dl","slug":"the-video-has-been-deleted","errorCode":null,"errorMessage":"The video has been deleted.","messagePattern":"The video has been deleted\\.","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/niconico.py","lineNumber":414,"sourceCode":"\n        # Get video info\n        video_info_xml = self._download_xml(\n            'http://ext.nicovideo.jp/api/getthumbinfo/' + video_id,\n            video_id, note='Downloading video info page')\n\n        def get_video_info_xml(items):\n            if not isinstance(items, list):\n                items = [items]\n            for item in items:\n                ret = xpath_text(video_info_xml, './/' + item)\n                if ret:\n                    return ret\n\n        if get_video_info_xml('error'):\n            error_code = get_video_info_xml('code')\n\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 {}:","sourceCodeStart":396,"sourceCodeEnd":432,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/niconico.py#L396-L432","documentation":"Raised by NiconicoIE when the getthumbinfo XML reports an <error> whose <code> is 'DELETED'. The video metadata endpoint confirms the submission was deleted from Nico Nico Douga, so no formats can be fetched. Marked expected=True.","triggerScenarios":"Extracting any nicovideo.jp/watch/sm## URL for which the video info XML contains error/code = 'DELETED'.","commonSituations":"Old links to videos removed by the uploader or taken down for policy/copyright reasons; no downloader-side remedy exists.","solutions":["Accept it: the video is deleted server-side and cannot be downloaded from Niconico.","Look for reprints/mirrors elsewhere (creator's other uploads, official channels) if you need the content.","In batch jobs, catch this expected ExtractorError and mark the URL dead rather than retrying."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import requests\nxml = requests.get(f'https://ext.nicovideo.jp/api/getthumbinfo/{video_id}').text\nif '<code>DELETED</code>' in xml:\n    print('video deleted — do not attempt download')","typeGuard":null,"tryCatchPattern":"except ExtractorError as e:\n    if e.expected and 'deleted' in str(e).lower():\n        mark_url_dead(url)  # permanent; never re-queue\n    else:\n        raise","preventionTips":["Pre-check IDs against the public getthumbinfo API before batch downloads.","Classify DELETED as permanent in retry policies to avoid wasted runs.","Archive from mirrors if the content matters — the source is gone."],"tags":["content-deleted","niconico","extractor","expected-error"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}