-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
28 lines (23 loc) · 800 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import pyrogram
# Replace these with your own Telegram API keys
api_id = 'YOUR_API_ID'
api_hash = 'YOUR_API_HASH'
# Authenticate with Telegram
client = pyrogram.Client(
'my_account',
api_id=api_id,
api_hash=api_hash
)
# The ID of the group you want to take screenshots of
group_id = 'YOUR_GROUP_ID'
# Take multiple screenshots of the group
for i in range(10):
screenshot = client.screenshot_group(group_id)
screenshot.save('screenshot_{}.png'.format(i))
# Log the user ID, username, and profile picture of the users in the group
group_info = client.get_chat(group_id)
print('Users in the group:')
for user in group_info.users:
print('ID: {}'.format(user.id))
print('Username: {}'.format(user.username))
print('Profile picture: {}'.format(user.photo.big_file_id))