[ie/vk] support vk.ru domain

Authored by: bashonly
This commit is contained in:
bashonly 2024-12-03 07:36:10 -06:00
parent 868bc14743
commit bf8518f2f6
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

View File

@ -92,17 +92,17 @@ class VKBaseIE(InfoExtractor):
class VKIE(VKBaseIE): class VKIE(VKBaseIE):
IE_NAME = 'vk' IE_NAME = 'vk'
IE_DESC = 'VK' IE_DESC = 'VK'
_EMBED_REGEX = [r'<iframe[^>]+?src=(["\'])(?P<url>https?://vk(?:video\.ru|\.com)/video_ext\.php.+?)\1'] _EMBED_REGEX = [r'<iframe[^>]+?src=(["\'])(?P<url>https?://vk(?:(?:video)?\.ru|\.com)/video_ext\.php.+?)\1']
_VALID_URL = r'''(?x) _VALID_URL = r'''(?x)
https?:// https?://
(?: (?:
(?: (?:
(?:(?:m|new)\.)?vk(?:video\.ru|\.com)/video_| (?:(?:m|new)\.)?vk(?:(?:video)?\.ru|\.com)/video_|
(?:www\.)?daxab\.com/ (?:www\.)?daxab\.com/
) )
ext\.php\?(?P<embed_query>.*?\boid=(?P<oid>-?\d+).*?\bid=(?P<id>\d+).*)| ext\.php\?(?P<embed_query>.*?\boid=(?P<oid>-?\d+).*?\bid=(?P<id>\d+).*)|
(?: (?:
(?:(?:m|new)\.)?vk(?:video\.ru|\.com)/(?:.+?\?.*?z=)?(?:video|clip)| (?:(?:m|new)\.)?vk(?:(?:video)?\.ru|\.com)/(?:.+?\?.*?z=)?(?:video|clip)|
(?:www\.)?daxab\.com/embed/ (?:www\.)?daxab\.com/embed/
) )
(?P<videoid>-?\d+_\d+)(?:.*\blist=(?P<list_id>([\da-f]+)|(ln-[\da-zA-Z]+)))? (?P<videoid>-?\d+_\d+)(?:.*\blist=(?P<list_id>([\da-f]+)|(ln-[\da-zA-Z]+)))?
@ -321,6 +321,10 @@ class VKIE(VKBaseIE):
'url': 'https://vkvideo.ru/video-127553155_456242961', 'url': 'https://vkvideo.ru/video-127553155_456242961',
'only_matching': True, 'only_matching': True,
}, },
{
'url': 'https://vk.ru/video-220754053_456242564',
'only_matching': True,
},
] ]
def _real_extract(self, url): def _real_extract(self, url):