This is my project for parsing Telegram channels and chats and processing received data
- Python
3.12.0
or earlier (CPython) - MongoDB
- Your Telegram API token, learn more here
- Run git clone:
git clone https://github.com/artmih24/TeleParser.git
- Go to project directory:
cd TeleParser
- Create Python venv:
- on Windows:
python -m venv .
- on Linux/macOS/other Unix-like OS:
python3 -m venv .
- on Windows:
- Select project Python venv:
- on Windows:
.\Scripts\activate
- on Linux/macOS/other Unix-like OS:
source ./bin/activate
- on Windows:
- Install dependencies:
- on Windows:
pip install -r .\requirements.txt
- on Linux/macOS/other Unix-like OS:
pip3 install -r ./requirements.txt
- on Windows:
- You can use setup scripts:
- on Windows:
or
.\setup.cmd
or.\setup.bat
.\setup.ps1
- on Linux/macOS/other Unix-like OS:
./setup.sh
- on Windows:
- Get your own Telegram API token here
- Make sure that:
- You have received Your Telegram API token
- And You have replaced contents in
config.ini
file by your Telegram API token
- Launch this script:
- on Windows:
python .\TeleParser.py
- on Linux/macOS/other Unix-like OS:
python3 ./TeleParser.py
- You can write channel or chat name (written after '@' or
t.me/
/https://t.me/
) as command-line argument
- on Windows:
- Login in Telegram if You weren't logged in (trust me, this script doesn't steal your Telegram token, login and password)
- If You haven't written channel or chat name as command-line argument, enter channel or chat name (written after '@' or
t.me/
/https://t.me/
) and press Enter key - Wait until this script will parse and process all data (it can take a lot of time, please be patient and wait) and press Enter key
- You can view all
.json
and.csv
files with received data and view all data in MongoDB database
Don't give Your Telegram API token to anyone!