Skip to main content

Download videos from Telegram channels

Project description

Telegram Downloader

A Python CLI tool to download videos from Telegram channels.

Installation

pip install telegram-dl

Setup

  1. Go to my.telegram.org
  2. Log in and create an app
  3. Copy your API ID and API Hash

Usage

List your channels

telegram-dl --api-id 12345 --api-hash abc123 --phone +1234567890 --list-channels

Download all videos from a channel

telegram-dl --api-id 12345 --api-hash abc123 --phone +1234567890 --channel -100123456789

Download to custom directory

telegram-dl --api-id 12345 --api-hash abc123 --phone +1234567890 --channel -100123456789 --output ./my_videos

Programmatic Usage

from telegram_dl import TelegramDownloader

async def main():
    async with TelegramDownloader(api_id, api_hash, phone) as dl:
        # List channels
        for dialog in dl.client.iter_dialogs():
            if dialog.is_channel:
                print(f"{dialog.id} | {dialog.title}")
        
        # Download all videos
        await dl.download_all_videos(channel_id, "./videos")

asyncio.run(main())

Features

  • Download all videos from Telegram channels
  • Automatic session management (login once, use many times)
  • Progress tracking
  • Named file preservation
  • Skip already downloaded files

License

MIT

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

telegram_dl-1.0.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

telegram_dl-1.0.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file telegram_dl-1.0.0.tar.gz.

File metadata

  • Download URL: telegram_dl-1.0.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for telegram_dl-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ae767be4af7b6d1e3d8057e52d2793c34e1d6dafc28c760771223f6d409ddba2
MD5 2f2771002db65d2abdae290ab74f5419
BLAKE2b-256 7c09e8967008a87d90e5a521123e67bedc3c43248111554fb80dbe47e1b7c387

See more details on using hashes here.

File details

Details for the file telegram_dl-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: telegram_dl-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for telegram_dl-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5720d9f4cafdf70be06fc553d5771da06a0b20fe02c5d681e66b755f8fb0d6f
MD5 109c5068a3d68cf0598ee1bbf74df874
BLAKE2b-256 f952c816df7c1312a2f7ca75be119307d447c7c1a77f2d669decde200fc0c5a0

See more details on using hashes here.

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