api/vk: use proper api, add support for more links, refactor

also added support for video access keys
This commit is contained in:
wukko
2024-11-28 16:01:26 +06:00
parent 5ffc0c6161
commit f696335278
5 changed files with 134 additions and 41 deletions

View File

@@ -56,7 +56,8 @@ export const testers = {
&& (!pattern.password || pattern.password.length < 16),
"vk": pattern =>
pattern.userId?.length <= 10 && pattern.videoId?.length <= 10,
(pattern.ownerId?.length <= 10 && pattern.videoId?.length <= 10) ||
(pattern.ownerId?.length <= 10 && pattern.videoId?.length <= 10 && pattern.videoId?.accessKey <= 18),
"youtube": pattern =>
pattern.id?.length <= 11,