The Telegram Tracker is a Python project designed to monitor the online/offline activity of your Telegram contacts and store this data in a MySQL/SQLite database.
The motivation for creating this project came from my desire to study data science and data analysis.
- Contact Monitoring: Keep track of when your Telegram contacts go online and offline.
- Data Storage: Store the timestamps of online and offline events in a MySQL database.
- Activity Insights: Gain insights into your contacts' online patterns over time.
-
Clone the repository: Start by cloning this repository to your local machine.
git clone https://github.com/cubicbyte/telegram-tracker.git cd telegram-tracker
-
Install dependencies: Install the necessary dependencies using the provided
requirements.txt
file:pip install -r requirements.txt
-
Setup .env configuration file: Copy
.env.example
to.env
and modify it according to your needs. Update theAPI_ID
andAPI_HASH
with your Telegram API credentials (https://my.telegram.org): -
Database setup: Depending on the chosen database type, run either
scripts/setup_mysql_db.py
orscripts/setup_sqlite_db.py
to set up the database structure. Default database is sqlite. -
Run the tracker: Execute the main script:
python main.py
At first startup the program will guide you through the login process for Telegram.
This project is meant for personal and educational purposes as it said in the description. Respect the privacy of your contacts and ensure you have their consent before tracking their online activity.
Contributions are welcome! If you find issues or have feature ideas, feel free to open an issue or pull request.
This project is licensed under the MIT License.