Skip to content

About

A console script to download media from a Telegram chat, channel, or group.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Telegram Media Downloader

A console script to download media from a Telegram chat, channel, or group.

Features

  • Download chat media: images, videos, documents, voice messages (saved in subfolders)
  • Download current profile photo or all profile photos
  • Download stories:
    • Active stories only
    • All stories (active + pinned)
  • Support download self-destructing media.
  • Support download view-only and restricted media.

Install

pip install -r requirements.txt

Configure (config.py)

api_id = 123456
api_hash = 'your_api_hash'
session_name = 'myaccount.session'  # optional
device_model = 'iPhone X'               # optional

Get api_id/api_hash from https://my.telegram.org/auth?to=apps.

Run

python main.py

Menu options:

  • 1: Download chat media
  • 2: Download current profile photo
  • 3: Download all profile photos
  • 4: Download active stories
  • 5: Download all stories (active + pinned)
  • 6: Close

Downloads are saved under Downloads/<chat_name>/ with subfolders:

  • images/, videos/, documents/, voice/, stories/, profile/

Project structure

  • main.py: login + menu
  • core/client.py: Telethon client factory
  • core/utils.py: helpers (paths, progress)
  • core/media/chat.py: chat media downloader
  • core/media/profile.py: profile photos
  • core/media/story.py: stories (active, all)

License

MIT. See LICENSE.

About

A console script to download media from a Telegram chat, channel, or group.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages