Skip to content

glebone/Televibe

Repository files navigation

Telegram Channel Reader

A Python application for reading and browsing Telegram channel messages with multiple client interfaces.

Features

  • Multiple Interfaces:
    • NCurses terminal UI with interactive navigation
    • Command-line interface (CLI)
    • Core library for custom implementations
  • Message Browsing: Navigate through channels and messages with keyboard controls
  • Message Details: View full message content with scrolling support
  • Real-time Refresh: Update messages without restarting the application
  • Session Management: Automatic session handling for seamless reconnection

Prerequisites

  • Python 3.7+
  • Telegram account
  • Telegram API credentials

Quick Start

1. Get Telegram API Credentials

  1. Visit https://my.telegram.org/
  2. Log in with your phone number
  3. Go to "API development tools"
  4. Create a new application:
    • App title: Your app name (e.g., "Channel Reader")
    • Short name: A short identifier
    • Platform: Desktop
    • Description: Brief description
  5. Save your api_id and api_hash

2. Installation

# Clone the repository
git clone <repository-url>
cd televibe

# Install dependencies
pip install -r requirements.txt

3. Configuration

# Copy the example configuration
cp config.example.json config.json

# Edit config.json with your credentials

Update config.json with your details:

{
  "api_id": 12345678,
  "api_hash": "your_api_hash_here",
  "phone": "+1234567890",
  "channels": ["@telegram", "@durov"],
  "message_count": 10
}

4. First Run

# Test with CLI client first
python cli_client.py

On first run:

  • You'll be prompted for a verification code
  • Check your Telegram app for the code
  • Enter the code to create a session

Usage

NCurses Client (Recommended)

python ncurses_client.py

Controls:

  • ↑↓ - Navigate channels
  • ←→ - Navigate messages
  • Enter - View message details
  • ESC - Exit detail view
  • r - Refresh messages
  • q - Quit

CLI Client

python cli_client.py

Displays messages in a simple text format.

Main Reader

python telegram_reader.py

Basic reader that outputs all messages as JSON.

Finding Channels

To add channels to monitor:

  1. Open the channel in Telegram
  2. Check the channel info for the username (starts with @)
  3. Add to the channels array in config.json

Project Structure

televibe/
├── core.py              # Core Telegram reader functionality
├── ncurses_client.py    # Interactive terminal UI
├── cli_client.py        # Command-line interface
├── telegram_reader.py   # Basic reader implementation
├── config.json          # Your configuration (git-ignored)
├── config.example.json  # Configuration template
├── requirements.txt     # Python dependencies
└── README.md           # This file

Troubleshooting

  • SessionPasswordNeededError: Your account has 2FA enabled. Currently not supported.
  • ChannelPrivateError: The channel is private. You need to be a member.
  • FloodWaitError: Too many requests. Wait before trying again.
  • Connection errors: Check internet connection and firewall settings.

Security

  • Keep your api_id and api_hash secret
  • Never commit config.json or *.session files
  • The session file contains your login credentials

License

This project is for educational purposes. Please respect Telegram's Terms of Service and API usage guidelines.

About

Tool for reading news from different telegram channels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages