Skip to content

Latest commit

 

History

History
85 lines (80 loc) · 2.45 KB

readme.md

File metadata and controls

85 lines (80 loc) · 2.45 KB

TeleParser

This is my project for parsing Telegram channels and chats and processing received data

Requirements

  1. Python 3.12.0 or earlier (CPython)
  2. MongoDB
  3. Your Telegram API token, learn more here

Get started

  1. Run git clone:
    git clone https://github.com/artmih24/TeleParser.git
  2. Go to project directory:
    cd TeleParser
  3. Create Python venv:
    • on Windows:
      python -m venv .
    • on Linux/macOS/other Unix-like OS:
      python3 -m venv .
  4. Select project Python venv:
    • on Windows:
      .\Scripts\activate
    • on Linux/macOS/other Unix-like OS:
      source ./bin/activate
  5. Install dependencies:
    • on Windows:
      pip install -r .\requirements.txt
    • on Linux/macOS/other Unix-like OS:
      pip3 install -r ./requirements.txt
  6. You can use setup scripts:
    • on Windows:
      .\setup.cmd
      or
      .\setup.bat
      or
      .\setup.ps1
    • on Linux/macOS/other Unix-like OS:
      ./setup.sh
  7. Get your own Telegram API token here

How to use

  1. Make sure that:
    • You have received Your Telegram API token
    • And You have replaced contents in config.ini file by your Telegram API token
  2. 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
  3. Login in Telegram if You weren't logged in (trust me, this script doesn't steal your Telegram token, login and password)
  4. 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
  5. 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
  6. You can view all .json and .csv files with received data and view all data in MongoDB database

WARNING

Don't give Your Telegram API token to anyone!