forked from proseltd/Telepathy-Community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtelepathy.py
36 lines (26 loc) · 983 Bytes
/
telepathy.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
29
30
31
32
33
34
35
36
# from telethon.sync import TelegramClient
# from telethon import TelegramClient
print('Welcome to Telepathy')
print('Please select a function:')
li = ['Batch chat archiver', 'Scrape group members', 'Scrape forwarded messages in a chat']
def display(line):
for idx, tables in enumerate(line):
print("%s. %s" % (idx+1, tables))
def get_list(line):
choose = int(input("\nPick a number:"))-1
if choose < 0 or choose > (len(line) - 1):
print('Invalid Choice')
return ''
return line[choose]
display(li)
choice = (get_list(li))
print('Loading', choice, '...')
if choice == 'Batch chat archiver':
print('Launching batch chat archiver')
exec(open("archiver.py").read())
elif choice == 'Scrape group members':
print('Launching group member scraper...')
exec(open("members.py").read())
elif choice == 'Scrape forwarded messages in a chat':
print('Launching channel forward scraper...')
exec(open("forwards.py").read())