diff options
author | aviperes <avipr24@gmail.com> | 2018-11-17 15:59:13 +0200 |
---|---|---|
committer | Sergey M <dstftw@gmail.com> | 2018-11-17 20:59:13 +0700 |
commit | a640c4d226e7b790fe8db43f1c5bdf2358caf839 (patch) | |
tree | f8d88db06cc7c7497ce2a40ef5f76c0ec6e254c9 | |
parent | d0058c76d5e14ffe89e8265fa3d984e28e922d78 (diff) |
[vk] Detect geo restriction
-rw-r--r-- | youtube_dl/extractor/vk.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.py index ef8b9bcb7..b52d15ac6 100644 --- a/youtube_dl/extractor/vk.py +++ b/youtube_dl/extractor/vk.py @@ -293,8 +293,12 @@ class VKIE(VKBaseIE): # This video is no longer available, because its author has been blocked. 'url': 'https://vk.com/video-10639516_456240611', 'only_matching': True, - } - ] + }, + { + # The video is not available in your region. + 'url': 'https://vk.com/video-51812607_171445436', + 'only_matching': True, + }] def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) @@ -354,6 +358,9 @@ class VKIE(VKBaseIE): r'<!>This video is no longer available, because it has been deleted.': 'Video %s is no longer available, because it has been deleted.', + + r'<!>The video .+? is not available in your region.': + 'Video %s is not available in your region.', } for error_re, error_msg in ERRORS.items(): |