ytdl-org/youtube-dl · error · ExtractorError
The video has been deleted.
Error message
The video has been deleted.
What it means
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.
Source
Thrown at youtube_dl/extractor/niconico.py:414
# Get video info
video_info_xml = self._download_xml(
'http://ext.nicovideo.jp/api/getthumbinfo/' + video_id,
video_id, note='Downloading video info page')
def get_video_info_xml(items):
if not isinstance(items, list):
items = [items]
for item in items:
ret = xpath_text(video_info_xml, './/' + item)
if ret:
return ret
if get_video_info_xml('error'):
error_code = get_video_info_xml('code')
if error_code == 'DELETED':
raise ExtractorError('The video has been deleted.',
expected=True)
elif error_code == 'NOT_FOUND':
raise ExtractorError('The video is not found.',
expected=True)
elif error_code == 'COMMUNITY':
self.to_screen('%s: The video is community members only.' % video_id)
else:
raise ExtractorError('%s reports error: %s' % (self.IE_NAME, error_code))
# Start extracting video formats
formats = []
# Get HTML5 videos info
quality_info = try_get(api_data, lambda x: x['media']['delivery']['movie'])
if not quality_info:
raise ExtractorError('The video can\'t be downloaded', expected=True)
for audio_quality in quality_info.get('audios') or {}:View on GitHub (pinned to 956b8c5855)
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.
Defensive patterns
Strategy: try-catch
Validate before calling
import requests
xml = requests.get(f'https://ext.nicovideo.jp/api/getthumbinfo/{video_id}').text
if '<code>DELETED</code>' in xml:
print('video deleted — do not attempt download') Try / catch
except ExtractorError as e:
if e.expected and 'deleted' in str(e).lower():
mark_url_dead(url) # permanent; never re-queue
else:
raise Prevention
- 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.
When it happens
Trigger: Extracting any nicovideo.jp/watch/sm## URL for which the video info XML contains error/code = 'DELETED'.
Common situations: Old links to videos removed by the uploader or taken down for policy/copyright reasons; no downloader-side remedy exists.
Related errors
- The video is not found.
- The video can't be downloaded
- %s said: %s
- Video %s is for friends only
- %s said: %s
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/699f985422028a1d.
Report an issue: GitHub.