Skip to main content

tflix: A Telegram CLI interface for media downloading and streaming.

Project description

NEED TO UPDATE !!

tflix

A Telegram CLI interface for media downloading and streaming.

Description

tflix streamlines the process of discovering and downloading media files from Telegram bots. It provides an interactive command-line interface that handles bot navigation, automatic channel joining, and media file downloads with minimal user intervention.

Features

  • Interactive CLI - Navigate bot menus and send messages directly from the terminal
  • Auto-Join Support - Automatically joins groups via invite links when required
  • Button Navigation - Click numbered options from bot menus instantly
  • Media Filtering - Lists and downloads files

Requirements

Installation

From PyPI

pip install tflix

From Source

git clone https://github.com/voidsnax/tflix.git
cd tflix
pip install -e .

Usage

Setup Guide

Creating the .env File

  1. Locate the config folder:

    • Windows: C:\Users\<User>\AppData\Local\tflix\
    • Linux/Mac: ~/.config/tflix/
  2. Create a new file named .env in the config folder

  3. Get your Telegram API credentials:

    • Visit https://my.telegram.org
    • Log in with your Telegram account
    • Go to "API development tools"
    • Create a new application
    • Copy your api_id and api_hash
  4. Add your credentials to .env:

    TGRAM_API_ID=your_api_id_here
    TGRAM_API_HASH=your_api_hash_here
    
  5. Save the file

Basic Command

tflix [CHAT] [OPTIONS]

Options

CHAT                  Chat username, ID, or link
-o, --output PATH     Output directory for downloads (default: current directory)
-l, --list VALUE      List recent N bot media messages (default: 2, max: 100)

Interactive Commands

[Text]     → Send message to bot
[Number]   → Click button # from available options
q[n]       → Quit and download last n messages
exit       → Exit without downloading

Examples

Connect to default bot and list 5 recent files:

tflix -l 5

Connect to a specific bot and set output folder:

tflix @bot -o C:\

Then interact:

Connected to: @bot
---------------------------------------------
Commands:
  [Text]     -> Send message
  [Number]   -> Click button # from the list
  exit       -> Quit
---------------------------------------------


## Notes

- **API Credentials** - Create `.env` in config folder with `TGRAM_API_ID` and `TGRAM_API_HASH`
- **Session Changes** - Overwrites existing session when .env file attributes changes
- **Private groups** - need invite link
- **Inactivity Timeout** - Sessions automatically exit after 10 minutes without input (when server is not running)
- **File Freshness** - Re-fetch files if older downloads fail; bots may remove expired links
- **Input Delay** - Allow 10-15 seconds for input to process if responses seem delayed
- **Message Listing** - Limited to 100 recent messages per query

## License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tflix-1.1.1.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tflix-1.1.1-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file tflix-1.1.1.tar.gz.

File metadata

  • Download URL: tflix-1.1.1.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tflix-1.1.1.tar.gz
Algorithm Hash digest
SHA256 8dd9fa9a2ca1682c372849460b13776b4d8d98c62f7ba966ca9985d77f86a031
MD5 3bb3f655f084c237936deda543a35ba1
BLAKE2b-256 414e25f1381f73260dac43939dfcedea1e9a3f3d4e0fb3663a0f331134deacc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tflix-1.1.1.tar.gz:

Publisher: publish.yaml on voidsnax/tflix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tflix-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: tflix-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tflix-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d8f2d5326f86ce5f9ecc895901dd50c3ad04156b33c436913adb113a8103f51
MD5 796d33b959754a7609499f0cf01fb54c
BLAKE2b-256 2b90500b665f24df4059d9384a9baeeb4525b0e127080d213b0a9beb9bc94d9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tflix-1.1.1-py3-none-any.whl:

Publisher: publish.yaml on voidsnax/tflix

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page