fix: add vk.ru domain support for VK videos

This commit is contained in:
vrubelroman 2026-05-09 16:58:12 +03:00
parent 60a0373d7f
commit 5d3cd92a03
3 changed files with 10 additions and 10 deletions

View file

@ -119,7 +119,7 @@ def download():
logger.info(f"Получен запрос на скачивание: {url}")
# Проверяем, что это VK URL
if 'vk.com' not in url and 'vkontakte.ru' not in url:
if 'vk.com' not in url and 'vk.ru' not in url and 'vkontakte.ru' not in url:
return jsonify({'error': 'Only VK URLs are supported'}), 400
# Скачиваем видео
@ -151,7 +151,7 @@ def download_stream():
logger.info(f"Получен запрос на скачивание (stream): {url}")
# Проверяем, что это VK URL
if 'vk.com' not in url and 'vkontakte.ru' not in url:
if 'vk.com' not in url and 'vk.ru' not in url and 'vkontakte.ru' not in url:
return jsonify({'error': 'Only VK URLs are supported'}), 400
# Скачиваем видео