messages = client.get_entity('ИмяКанала')
print(messages)
for message in client.get_entity('ИмяКанала'):
# You can download media from messages, too!
# The method will return the path where the file was saved.
if message.photo:
path = message.download_media()
print('File saved to', path) # printed after download is done
пытаюсь выдрать хоть одну пишит ошибку
Traceback (most recent call last):
File "tg.py", line 16, in
for message in client.get_entity('ИмяКанала'):
TypeError: 'Channel' object is not iterable