This script is given a group name, and it fetches all messages/replies/reactions/etc sent in this chat. It connects to a TG account using the TDLib (Telegram Database Library) API.
cp .env_example .env- Login to your TG account here
- Click API development tools
- A
Create new applicationwindow will appear. Fill in your application details. There is no need to enter any URL, and only the first two fields (App title and Short name) can currently be changed later. - Click on Create application at the end. Remember that your API hash is secret and Telegram won’t let you revoke it. Don’t post it anywhere!
- Edit the .env file and fill in
tg_app_api_idandtg_app_api_hash. pip -r requirements.txt
// -l represent the amount of messages needed to analyze.
python3 main.py -g "My Group Name" -l 200