{"record":{"id":"8643665deb1974c4","repo":"ytdl-org/youtube-dl","slug":"you-are-trying-to-log-in-from-an-unusual-location","errorCode":null,"errorMessage":"You are trying to log in from an unusual location. You should confirm ownership at vk.com to log in with this IP.","messagePattern":"You are trying to log in from an unusual location\\. You should confirm ownership at vk\\.com to log in with this IP\\.","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/vk.py","lineNumber":344,"sourceCode":"            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.',\n\n                r'<!>Unknown error':\n                'Video %s does not exist.',","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/vk.py#L326-L362","documentation":"VK-specific anti-fraud error: the video_ext.php response contains a marker redirecting to login.php with act=security_check, meaning VK requires ownership confirmation because the login attempt came from an unusual location/IP. Raised with expected=True by VKIE.","triggerScenarios":"Extracting VK content while logged in (or via cookies) from an IP that VK's fraud system flags, so the embed page matches r'<!>/login\\.php\\?.*\\bact=security_check'.","commonSituations":"Running youtube-dl on a server/VPN/datacenter IP while using an account registered elsewhere; traveling; shared proxies.","solutions":["Log into vk.com from the same IP in a browser and complete the security check (confirm ownership)","Extract without account credentials if the content is public","Run the tool from a residential IP matching the account's usual location"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"from youtube_dl.utils import ExtractorError\ntry:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'unusual location' in str(e):\n        # fall back to anonymous extraction of public content\n        opts.pop('username', None); opts.pop('password', None)\n        youtube_dl.YoutubeDL(opts).extract_info(url)","preventionTips":["Complete VK's browser security check from the same IP once, then extract","Prefer residential IPs when authenticated extraction is required","Don't retry in a tight loop — the security check only clears manually"],"tags":["vk","security-check","ip-block","login"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}