feat: filter site bodies before media upload

This commit is contained in:
Your Name
2026-08-10 22:52:23 +05:00
parent e5ef3fb9e8
commit aad9ee46eb
16 changed files with 127 additions and 61 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import asyncio
from pathlib import Path
from vk_parser_app.workers.vk_storage_uploader import TelegramStorageUploader, video_provider
from vk_parser_app.workers.media_uploader import MediaUploader, video_provider
class FakeContent:
@@ -35,7 +35,7 @@ def test_video_provider() -> None:
async def test_http_video_download() -> None:
path = "/tmp/vkparser_tg_media_http_test.mp4"
result = await TelegramStorageUploader().download_http_video(FakeSession(), "https://example.test/a.mp4", path)
result = await MediaUploader().download_http_video(FakeSession(), "https://example.test/a.mp4", path)
assert result["size_bytes"] == 5
assert Path(path).read_bytes() == b"video"
Path(path).unlink()