diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-07-07 00:04:19 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-07-07 00:04:19 +0600 |
commit | 7f220b2facecde21ac3257d20938b63c1b6b01fb (patch) | |
tree | 99767db8ea50ffbb4f95ba20b874fca591f5931b /youtube_dl/extractor | |
parent | 275c0423aa85691fc78dda253fa5d00ab471e7b2 (diff) |
[vk] Catch ownership confirmation request
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/vk.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.py index 4ae28d4ca..ccd897084 100644 --- a/youtube_dl/extractor/vk.py +++ b/youtube_dl/extractor/vk.py @@ -156,6 +156,11 @@ class VKIE(InfoExtractor): info_url = 'https://vk.com/al_video.php?act=show&al=1&module=video&video=%s' % video_id info_page = self._download_webpage(info_url, video_id) + if re.search(r'<!>/login\.php\?.*\bact=security_check', info_page): + raise ExtractorError( + 'You are trying to log in from an unusual location. You should confirm ownership at vk.com to log in with this IP.', + expected=True) + ERRORS = { r'>Видеозапись .*? была изъята из публичного доступа в связи с обращением правообладателя.<': 'Video %s has been removed from public access due to rightholder complaint.', |