سلام دوستان من با متد get_chat_photos میخام تمام عکس های پروفایل یک گروه رو استخراج کنم از کد زیر هم استفاده کردم ولی فقط عکس اول رو دانلود می کنه
group = app.get_chat('@usernamegroup')
photo_profile = list(app.get_chat_photos(username))
output_group.rpush('task_output_group', f'count pictures: {len(photo_profile)}')
count = 0
for photo in photo_profile:
output_group.rpush('task_out_group', f"Photo {count + 1}: {photo}")
file_name = f"profile_{username.replace('@', '')}_{count}.jpg"
path_save = os.path.join(Profile_Group_DIR, file_name)
download = app.download_media(photo.file_id, file_name=path_save)
output_group.rpush('task_out_group', f"download pic {count + 1} in {download}")
count += 1