{"record":{"id":"d07f3eadfd3622d4","repo":"ytdl-org/youtube-dl","slug":"the-video-is-not-found","errorCode":null,"errorMessage":"The video is not found.","messagePattern":"The video is not found\\.","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/niconico.py","lineNumber":417,"sourceCode":"            '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 {}:\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","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/niconico.py#L399-L435","documentation":"Raised by NiconicoIE when the video info XML error code is 'NOT_FOUND' — the sm/nm/so ID does not correspond to any video (deleted-and-purged IDs also surface this way rather than DELETED). Marked expected=True.","triggerScenarios":"Extracting a nicovideo.jp/watch/<id> URL whose getthumbinfo response has error/code = 'NOT_FOUND'.","commonSituations":"Typos in IDs; links to long-purged videos; IDs that only exist as mylist ghosts. Nothing to fix client-side.","solutions":["Double-check the video ID/URL for typos.","Treat the ID as gone — Niconico reports no such video exists.","Handle as a permanent failure in automation (do not retry)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import requests\nxml = requests.get(f'https://ext.nicovideo.jp/api/getthumbinfo/{video_id}').text\nif '<code>NOT_FOUND</code>' in xml:\n    print('no such video — check the ID for typos')","typeGuard":null,"tryCatchPattern":"except ExtractorError as e:\n    if e.expected and 'not found' in str(e).lower():\n        drop_url(url)  # ID invalid or purged\n    else:\n        raise","preventionTips":["Validate niconico IDs (sm/so + digits) format-wise before requesting.","Use getthumbinfo as a cheap existence pre-check in crawlers.","Treat NOT_FOUND as permanent — do not retry."],"tags":["not-found","niconico","extractor","expected-error"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}