{"record":{"id":"e279ba944ff60049","repo":"ytdl-org/youtube-dl","slug":"error-message","errorCode":null,"errorMessage":"error_message","messagePattern":"error_message","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/vk.py","lineNumber":341,"sourceCode":"                data['list'] = list_id\n\n            payload = self._download_payload('al_video', video_id, data)\n            info_page = payload[1]\n            opts = payload[-1]\n            mv_data = opts.get('mvData') or {}\n            player = opts.get('player') or {}\n        else:\n            video_id = '%s_%s' % (mobj.group('oid'), mobj.group('id'))\n\n            info_page = self._download_webpage(\n                'http://vk.com/video_ext.php?' + mobj.group('embed_query'), video_id)\n\n            error_message = self._html_search_regex(\n                [r'(?s)<!><div[^>]+class=\"video_layer_message\"[^>]*>(.+?)</div>',\n                    r'(?s)<div[^>]+id=\"video_ext_msg\"[^>]*>(.+?)</div>'],\n                info_page, 'error message', default=None)\n            if error_message:\n                raise ExtractorError(error_message, expected=True)\n\n            if re.search(r'<!>/login\\.php\\?.*\\bact=security_check', info_page):\n                raise ExtractorError(\n                    'You are trying to log in from an unusual location. You should confirm ownership at vk.com to log in with this IP.',\n                    expected=True)\n\n            ERROR_COPYRIGHT = 'Video %s has been removed from public access due to rightholder complaint.'\n\n            ERRORS = {\n                r'>Видеозапись .*? была изъята из публичного доступа в связи с обращением правообладателя.<':\n                ERROR_COPYRIGHT,\n\n                r'>The video .*? was removed from public access by request of the copyright holder.<':\n                ERROR_COPYRIGHT,\n\n                r'<!>Please log in or <':\n                'Video %s is only available for registered users, '\n                'use --username and --password options to provide account credentials.',","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/vk.py#L323-L359","documentation":"Raised by VKIE when the embedded video page (vk.com/video_ext.php?...) contains a styled error div matching class 'video_layer_message' or id 'video_ext_msg'. The regex-extracted text becomes the error message (the tag name in the report is a placeholder, not the literal text). Expected=True.","triggerScenarios":"Downloading a VK video whose embed page renders an error notice — deleted video, removed by rightholder, login required — detected by the two _html_search_regex patterns on the video_ext.php response.","commonSituations":"Deleted or made-private videos; copyright takedowns; following stale links from forums/playlists.","solutions":["Check the message text: it states VK's reason (deleted, removed, private)","Open the video URL in a browser to confirm its current status","If it says login is needed, supply credentials or cookies so the embed shows content"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from youtube_dl.utils import ExtractorError\ntry:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'video_layer' not in str(e) and 'video_ext' not in str(e):\n        raise\n    log('VK says: %s — dropping %s' % (e, url))","preventionTips":["Validate embed URLs with a cheap HEAD/GET status check before full extraction","Prune deleted/private links from crawl results periodically","Surface the extracted div text to end users instead of hiding it"],"tags":["vk","embed","html-parsing","removed-video"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}