[vk:uservideos] Improve _VALID_URL (Closes #8389)
authorSergey M․ <dstftw@gmail.com>
Mon, 1 Feb 2016 18:52:37 +0000 (00:52 +0600)
committerSergey M․ <dstftw@gmail.com>
Mon, 1 Feb 2016 18:52:37 +0000 (00:52 +0600)
youtube_dl/extractor/vk.py

index 90557fa61d53f356dd430f698df028a842617e5d..11014865ade2624d2bf745459090c55ee907a6f0 100644 (file)
@@ -321,7 +321,7 @@ class VKIE(InfoExtractor):
 class VKUserVideosIE(InfoExtractor):
     IE_NAME = 'vk:uservideos'
     IE_DESC = "VK - User's Videos"
-    _VALID_URL = r'https?://vk\.com/videos(?P<id>-?[0-9]+)$'
+    _VALID_URL = r'https?://vk\.com/videos(?P<id>-?[0-9]+)(?!\?.*\bz=video)(?:[/?#&]|$)'
     _TEMPLATE_URL = 'https://vk.com/videos'
     _TESTS = [{
         'url': 'http://vk.com/videos205387401',
@@ -333,6 +333,9 @@ class VKUserVideosIE(InfoExtractor):
     }, {
         'url': 'http://vk.com/videos-77521',
         'only_matching': True,
+    }, {
+        'url': 'http://vk.com/videos-97664626?section=all',
+        'only_matching': True,
     }]
 
     def _real_extract(self, url):