[ie/vk:uservideos] Support alternate URL format (#14376)

Closes #11793
Authored by: seproDev
pull/13901/merge
sepro 1 week ago committed by GitHub
parent 4bc19adc87
commit bf5d18016b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -572,7 +572,7 @@ class VKUserVideosIE(VKBaseIE):
IE_DESC = "VK - User's Videos" IE_DESC = "VK - User's Videos"
_BASE_URL_RE = r'https?://(?:(?:m|new)\.)?vk(?:video\.ru|\.com/video)' _BASE_URL_RE = r'https?://(?:(?:m|new)\.)?vk(?:video\.ru|\.com/video)'
_VALID_URL = [ _VALID_URL = [
rf'{_BASE_URL_RE}/playlist/(?P<id>-?\d+_\d+)', rf'{_BASE_URL_RE}/playlist/(?P<id>-?\d+_-?\d+)',
rf'{_BASE_URL_RE}/(?P<id>@[^/?#]+)(?:/all)?/?(?!\?.*\bz=video)(?:[?#]|$)', rf'{_BASE_URL_RE}/(?P<id>@[^/?#]+)(?:/all)?/?(?!\?.*\bz=video)(?:[?#]|$)',
] ]
_TESTS = [{ _TESTS = [{
@ -602,6 +602,9 @@ class VKUserVideosIE(VKBaseIE):
}, { }, {
'url': 'https://vk.com/video/playlist/-174476437_2', 'url': 'https://vk.com/video/playlist/-174476437_2',
'only_matching': True, 'only_matching': True,
}, {
'url': 'https://vkvideo.ru/playlist/-51890028_-2',
'only_matching': True,
}] }]
_VIDEO = collections.namedtuple('Video', ['owner_id', 'id']) _VIDEO = collections.namedtuple('Video', ['owner_id', 'id'])

Loading…
Cancel
Save