Extraction Telegram Link - Extract Telegram Members from Telegram Groups
Scrolling down in a Telegram group's members' list and copy pasting every username is a tedious
and time-consuming process. Here is where programming comes in! Making tedious and time-consuming jobs easy and enjoyable!
There are two ways to:
extract telegram group members
1. Use Telegram Group Crawler which is a great extraction telegram link tool.
2. Do the code yourself! which I explain in details below!
First of all you will need to install python on your operating system. After that, assuming you have a working python installation, you will need to install
telethonwhich is a python client for Telegram API.
pip install telethon
Then in any text editor that you prefer type in
from telethon import TelegramClient, sync
This will import the
TelegramClientobject that gonna be used for connecting to the Telegram API. the
syncindicates that we want a sync (and not async!) functionality of the library. The next step is obtaining
API_HASHfrom Telegram Account Management Dashboard.
client = TelegramClient(SessionName, API_ID, API_HASH)
SessionNameis the session you want to use for connecting to the Telegram API. The next step is to connect to the Telegram API.
thats all! Next we need to target the group that we want to take members from.
get_entityis the method we use for such purpose. We will use EliteCryptoForex as sample for this tutorial.
group = client.get_entity('https://t.me/EliteCryptoForex')
The next step is to join the group. So we import
from telethon.tl.functions.channels import JoinChannelRequest
and in the next line
Next we ask Telegram API to give us the participates list of this group. easy huh?
participants = client.get_participants(group)
Now we iterate through participants and write their usernames (each one in a new line!) to a file!
with open('members.txt', 'a') as members:
for p in participants:
Contact me directly if you have any questions regarding the script! You could also buy Telegram Group Scraper or Buy Telegram Members using other sections of the website.
Author: Amin Etesamian
extract telegram members extraction telegram link