import json from pyrogram import Client from pyrogram api import funct

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import json
from pyrogram import Client
from pyrogram.api import functions
SESSION_ID = '***:***'
config = json.load(open('var/config.json'))
app = Client(
SESSION_ID,
api_id=config['api_id'],
api_hash=config['api_hash'],
)
with app:
username = 'tgdev_en'
for member in app.iter_chat_members(username):
print(member)