Skip to content

Add Telegram Web stream downloads#1243

Open
hongleir2 wants to merge 1 commit into
iyear:masterfrom
hongleir2:codex/stream-download-location
Open

Add Telegram Web stream downloads#1243
hongleir2 wants to merge 1 commit into
iyear:masterfrom
hongleir2:codex/stream-download-location

Conversation

@hongleir2

@hongleir2 hongleir2 commented May 25, 2026

Copy link
Copy Markdown

Summary

This PR adds support for downloading Telegram Web stream media directly using the --stream flag, without requiring a public/private message URL or a prior message export step.

What gets downloaded

  • Media files — Telegram Web stream/... payloads that point to document media such as videos or other files
  • Original filenames — uses the fileName value from the stream payload when available

New flags

Flag Description
--stream <stream_payload> Download a Telegram Web stream/... payload

Usage & Examples

Download a Telegram Web stream payload:

tdl dl --stream <stream_payload>

# Example
tdl dl --stream 'stream/%7B%22dcId%22%3A1...%7D'

Download multiple stream payloads:

tdl dl --stream <stream_payload_1> --stream <stream_payload_2>

Optional: save to a specific directory:

tdl dl --stream <stream_payload> -d ./downloads

Optional: rewrite the output extension from detected file content:

tdl dl --stream <stream_payload> --rewrite-ext

Notes

Telegram Web stream payloads include temporary file_reference values. If the reference has expired, refresh Telegram Web and copy a fresh stream/... value, or use the original message link when available.

Validation

  • go test ./app/dl ./cmd
  • Manual verification with valid Telegram Web stream/... payloads saved files to ~/Downloads.

@hongleir2 hongleir2 marked this pull request as ready for review May 25, 2026 02:19
@hongleir2 hongleir2 requested a review from XMLHexagram as a code owner May 25, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants