minor fixes

This commit is contained in:
garickbadalov 2023-10-17 14:51:22 +03:00
parent a0f33895c6
commit 45811384c3
4 changed files with 5 additions and 5 deletions

View File

@ -2,8 +2,8 @@ api_hash: cb06da2bf01e15627434223242b6446d
api_id: 21648766 api_id: 21648766
chat: chat:
- chat_id: landigos - chat_id: landigos
download_filter: id == 6964 download_filter: id == 6989
last_read_message_id: 6964 last_read_message_id: 6989
file_formats: file_formats:
video: video:
- all - all

View File

@ -8,7 +8,7 @@ from zipfile import ZipFile
from loguru import logger 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 # pylint: disable = R0902

View File

@ -1,4 +1,5 @@
import os import os
from asyncio import gather
from urllib.parse import urlparse from urllib.parse import urlparse
from loguru import logger from loguru import logger
@ -29,8 +30,7 @@ class TelegramParser(BaseParser):
mode="w+", encoding="utf-8") as f: mode="w+", encoding="utf-8") as f:
YAML().dump(config, f) YAML().dump(config, f)
if _check_config(): if _check_config():
app.loop.run_until_complete(download_all_chat(client)) app.loop.run_until_complete(gather(*[download_all_chat(client), worker(client)]))
app.loop.run_until_complete(worker(client))
client.stop() client.stop()
app.is_running = False app.is_running = False
logger.info("Stopped!") logger.info("Stopped!")