{"record":{"id":"1a104e5e51321a96","repo":"ytdl-org/youtube-dl","slug":"video-s-has-been-deleted","errorCode":null,"errorMessage":"Video %s has been deleted","messagePattern":"Video (.+?) has been deleted","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/afreecatv.py","lineNumber":229,"sourceCode":"            -7: 'You cannot use your Global AfreecaTV account to access Korean AfreecaTV.',\n            -10: 'Sorry for the inconvenience. \\nYour account has been blocked due to an unauthorized access. \\nPlease contact our Help Center for assistance.',\n            -32008: 'You have failed to log in. Please contact our Help Center.',\n        }\n\n        result = int_or_none(response.get('RESULT'))\n        if result != 1:\n            error = _ERRORS.get(result, 'You have failed to log in.')\n            raise ExtractorError(\n                'Unable to login: %s said: %s' % (self.IE_NAME, error),\n                expected=True)\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n\n        webpage = self._download_webpage(url, video_id)\n\n        if re.search(r'alert\\([\"\\']This video has been deleted', webpage):\n            raise ExtractorError(\n                'Video %s has been deleted' % video_id, expected=True)\n\n        station_id = self._search_regex(\n            r'nStationNo\\s*=\\s*(\\d+)', webpage, 'station')\n        bbs_id = self._search_regex(\n            r'nBbsNo\\s*=\\s*(\\d+)', webpage, 'bbs')\n        video_id = self._search_regex(\n            r'nTitleNo\\s*=\\s*(\\d+)', webpage, 'title', default=video_id)\n\n        partial_view = False\n        for _ in range(2):\n            query = {\n                'nTitleNo': video_id,\n                'nStationNo': station_id,\n                'nBbsNo': bbs_id,\n            }\n            if partial_view:\n                query['partialView'] = 'SKIP_ADULT'","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/afreecatv.py#L211-L247","documentation":"Raised in AfreecaTV's _real_extract when the downloaded video page HTML matches the pattern alert(['\\\"]This video has been deleted. The site itself declares the video deleted, so extraction stops immediately. Marked expected=True.","triggerScenarios":"Downloading a VOD page whose inline JavaScript shows the deletion alert; broadcaster removed the replay; URL for an old broadcast whose retention period expired.","commonSituations":"Following links from stale playlists or bookmarks; replays past AfreecaTV's retention window; broadcaster-deleted content.","solutions":["Accept it: the video is gone server-side and no client-side fix exists","Check the broadcaster's channel page for a re-upload or a replacement video","Remove the dead URL from batch/playlist files to stop repeated failures"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Cheap pre-check: fetch the page and look for the deletion alert before full extraction\nimport requests\nhtml = requests.get(url).text\nif 'This video has been deleted' in html:\n    mark_url_dead(url)  # skip extraction","typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'has been deleted' in str(e):\n        remove_from_playlist(url)  # permanent, do not retry","preventionTips":["Prune deleted-video URLs from batch lists as soon as this error appears — retries never succeed","For archival, download replays promptly before AfreecaTV's retention expires"],"tags":["afreecatv","deleted-video","content-missing"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}