8.12 GB
699 files
Updated 2 months ago
Name
Size
.git
.vscode
bot
ipaextract
.gitignore72 Bytes
xet
Dockerfile132 Bytes
xet
LICENSE1.07 kB
xet
Peanote_AI_Voice_Notes_v1_4_4_Subscription_Unlocked_blatant_Patched.ipa31.6 MB
xet
README.md2.74 kB
xet
kingmod_frameworks.zip83.3 MB
xet
pubg_bgmi_430_kingmod_update_05.ipa3.86 GB
xet
requirements.txt96 Bytes
xet
README.md

Telegram downloader

This is a simple bot to download telegram files directly to your own server without needing to keep telegram open or using telegram-cli, this uses Telegram's MTProto protocol to download files up to 4GB using the Pyrogram Framework.

Setup

To setup this bot on your own server you'll need a Telegram API ID/Hash, it can be created at My Telegram website, do this before continue

If you want to run this bot on a docker server follow Environment variables guide and then Docker install guide.

Install dependencies

To install all needed dependencies use pip:

python3 -m pip install -r requirements.txt

If you have any issue, try to install build-essentials in your system, the psutil lib sometimes needs to be builded locally.

Environment variables

Observation: This bot support dot files(.env)

Now that you've your own ID/Hash it has to be passed to TELEGRAM_API_ID and TELEGRAM_API_HASH environment variables, you also need to set the bot token(create one here) as BOT_TOKEN, and if you want to download files from channels that doesn't allow forwarding/copying content you need to set PHONE_NUMBER with your number that is used on a telegram account that is allowed to access the content you want to download.

The default download folder is /data, if you want to set another location define that as DOWNLOAD_FOLDER, default session storage path is /config but it can be set by CONFIG_FOLDER, this can be usefull for saving session across updates.

You also need to set the bot administrator list using ADMINS, use spaces to separate everyone.

Running

To run this bot it has to be started as a module, to this use -m flag:

python3 -m bot

When you wanna stop the bot, press CTRL+\

Docker run

This bot is so simple that you only need to set some environment variables and mount a folder inside the container to keep your downloads, for this, use this command replacing values with your owns:

# Build a docker image to your own server
docker build -t telegram-downloader .

# Now run this
docker run \
    -it `# optional, use -d if you won't use your account to download content` \
    -v /home/$USER/TDownloader/data:/data \
    -v /home/$USER/TDownloader/config:/config \
    -e TELEGRAM_API_ID=123456 \
    -e TELEGRAM_API_HASH="yourTelegramAPIHash" \
    -e BOT_TOKEN="yourBotToken" \
    -e PHONE_NUMBER="yourPhoneNumber" `# optional` \
    -e ADMINS="@yourTelegramUsername" \
    telegram-downloader
Total size
8.12 GB
Files
699
Last updated
May 5
Pre-warmed CDN
US EU US EU

Contributors