Skip to content

sualh1999/Telegram-group-member-scrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

📌 Telegram Group Member Scraper

This script was created for a special case where we needed to extract usernames from a specific Telegram group and split them among team members for private messaging.

🚀 Features:

✅ Fetches a list of joined groups
✅ Scrapes active members from a selected group
✅ Allows filtering out inactive users
✅ Saves extracted members in JSON format
✅ Splits user lists into multiple parts for easier distribution
✅ Option to save splits as separate files or combined

🔧 Setup & Usage:

1️⃣ Install dependencies:

Ensure you have Python installed, then install the required packages:

pip install telethon

2️⃣ Configure API Credentials:

Edit the script and replace:

API_ID = 'Replace it with your api id' 
API_HASH = 'Replace it with your api hash'

Get your API credentials from my.telegram.org.

3️⃣ Run the Script:

Scrape Members from a Group:

python main.py -scrape

This will list all the groups you’ve joined and allow you to select one for scraping.

Split Extracted Members:

python main.py -split

This will divide the members into equal parts for distribution.

Save Splits as Separate Files:

python main.py -split -to-separate-files

Include Inactive Users:

By default, the script excludes users who were last seen over a month ago. To include them, use:

python main.py -scrape -add-old-users

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages