diff --git a/src/parsers/Telegram/telegram_media_downloader/config.yaml b/src/parsers/Telegram/telegram_media_downloader/config.yaml index dcb5cbc..f0b7f7a 100644 --- a/src/parsers/Telegram/telegram_media_downloader/config.yaml +++ b/src/parsers/Telegram/telegram_media_downloader/config.yaml @@ -2,8 +2,8 @@ api_hash: cb06da2bf01e15627434223242b6446d api_id: 21648766 chat: - chat_id: landigos - download_filter: id == 6964 - last_read_message_id: 6964 + download_filter: id == 6989 + last_read_message_id: 6989 file_formats: video: - all diff --git a/src/parsers/Telegram/telegram_media_downloader/module/cloud_drive.py b/src/parsers/Telegram/telegram_media_downloader/module/cloud_drive.py index ae51e38..97209b7 100644 --- a/src/parsers/Telegram/telegram_media_downloader/module/cloud_drive.py +++ b/src/parsers/Telegram/telegram_media_downloader/module/cloud_drive.py @@ -8,7 +8,7 @@ from zipfile import ZipFile from loguru import logger -from src.parsers.Telegram.telegram_media_downloader.utils import platform +from src.parsers.Telegram.telegram_media_downloader.utils import platforms as platform # pylint: disable = R0902 diff --git a/src/parsers/Telegram/telegram_media_downloader/telegram_parser.py b/src/parsers/Telegram/telegram_media_downloader/telegram_parser.py index 1aef684..950f367 100644 --- a/src/parsers/Telegram/telegram_media_downloader/telegram_parser.py +++ b/src/parsers/Telegram/telegram_media_downloader/telegram_parser.py @@ -1,4 +1,5 @@ import os +from asyncio import gather from urllib.parse import urlparse from loguru import logger @@ -29,8 +30,7 @@ class TelegramParser(BaseParser): mode="w+", encoding="utf-8") as f: YAML().dump(config, f) if _check_config(): - app.loop.run_until_complete(download_all_chat(client)) - app.loop.run_until_complete(worker(client)) + app.loop.run_until_complete(gather(*[download_all_chat(client), worker(client)])) client.stop() app.is_running = False logger.info("Stopped!") diff --git a/src/parsers/Telegram/telegram_media_downloader/utils/platform.py b/src/parsers/Telegram/telegram_media_downloader/utils/platforms.py similarity index 100% rename from src/parsers/Telegram/telegram_media_downloader/utils/platform.py rename to src/parsers/Telegram/telegram_media_downloader/utils/platforms.py