Skip to main content

Script that downloads telegram restricted content.

Project description

rcdtool

Script that downloads telegram restricted content.

Usage

For help:

./rcdtool --help

Normally, the script will take the channel and message IDs from the CLI argument, but if you did not provide them, then the script will prompt your for each missing ID. You can also customize the output filename.

If you have channel and message IDs you can do:

./rcdtool -c /path/to/config.ini -C <channel ID here> -M <message ID here> -O interesting-video.mp4

Then the script starts the downloading.

Well, if you use the Python script, then change rcdtool by python rcdtool et voilà.

Where I find these IDs?

In desktop: right click > copy message/post link. In mobile: touch the message > copy link

This link will have this format:

https://t.me/c/<channel ID>/<message ID>

Then, extract the IDs from the link. Or you can pass that link to the tool with --link as follows:

./rcdtool --link https://t.me/c/106942033f/123 -O stuff.png

Dist

In this repository we release the source code (Python) and a binary option for GNU/Linux. You can build a binary for any other operating system using tool as PyInstaller.

Telegram session

You MUST have an API ID provided by Telegram at https://my.telegram.org/ (I think). This is as follows:

api_id: 32767
api_hash: ed855a59bbe4a3360dbf7a0538842142

Then rename config.ini.sample to config.ini, edit it and save wherever you want. If the file is in the same directory as rcdtool and its name is exactly "config.ini", then rcdtool will load it automatically.

The first time, rcdtool will ask you for your phone number, and will start a login process. When this is done, a .session file will be created. With this .session file, the tool could access to your Telegram account to read messages and download medias. The name of the .session file is set in config.ini.

This tool answers to the question of how to bypass content forwarding/download restriction on telegram channels suck as restricted videos.

Advanced usage

You can define multiple message IDs separated by commas and define a range of message IDs using '..'.

# message id 34
rcdtool -c config.ini -C qwert -M 34

# message id 34 and 50
rcdtool -c config.ini -C qwert -M 34,50 -O download/photo

# message id range from 34 to 60
rcdtool -c config.ini -C -100200200 -M 34..60

# two message id and a message id range
rcdtool -c config.ini -C 200200 -M 13,15,20..30

# passing a simple link
rcdtool -c config.ini --link https://t.me/c/200200/503

# passing a link where the <message id> section define multiple message ids
rcdtool -c config.ini --link https://t.me/c/200200/13,15,20..30

You can request that the script infer the file extension.

rcdtool -c config.ini -C qwert -M 34 -O download/base --infer-extension

If you want to find a media in a comment on a channel post, use --discussion-message-id to set the message id of the comment.

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

rcdtool-2.1.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

rcdtool-2.1.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file rcdtool-2.1.1.tar.gz.

File metadata

  • Download URL: rcdtool-2.1.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for rcdtool-2.1.1.tar.gz
Algorithm Hash digest
SHA256 8b560bdc5549a61caaebc715dcdda7661424cf42cbc16724532bca17788cec8e
MD5 3afbaf52215df9950f86fcb70a9a7eb4
BLAKE2b-256 b9fe323165258db36d3c47536ab14cdb24c1820397d8924a9b745851b389ce78

See more details on using hashes here.

File details

Details for the file rcdtool-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: rcdtool-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for rcdtool-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e2bba7d0c1f1349295520cf96a0daee890d083ec82e88cc749482a1f68335da
MD5 a8e404f2a47303f6776f17eb4a57f0c3
BLAKE2b-256 1159f4c6a7674594a799b4c872e47b6b66c18ffdb86f2b9ff23c35a0af8248c2

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