12345678910111213141516171819202122232425262728293031 |
- from telethon import sync, events
- import time
- from telethon import TelegramClient
- n = 0
- ss = 879 #количество песен в группе
- api_id = 14881488 #ваш api_id
- api_hash = "ваш api_id"
- session = str("anon")
- client = TelegramClient(session, api_id, api_hash)
- client.start()
- while(True):
- msgs = client.get_messages('music_black_triangle', limit=ss)
- for msg in msgs:
- if msg.media is not None:
- client.download_media(message=msg)
- time.sleep(3)
- n = n + 1
- print("Скачано ")
- time.sleep(2)
- if n == 1:
- break
|