Telegram Bot for downloading MP3 rips of tracks/sets from SoundCloud, Bandcamp, YouTube with tags and artwork.





GitHub Stars



Last Commit

1mo ago










Music Downloader Telegram Bot aka scdlbot

.. image:: :target: :alt: Telegram Bot

.. image:: :target: :alt: MIT License

.. image:: :target: :alt: Documentation Status

.. image:: :target: :alt: PyPI Version

.. image:: :target: :alt: Travis CI Build Status

.. image:: :target: :alt: GitHub Actions Build Status

.. image:: :target: :alt: GitHub Actions CodeQL Status

.. image:: :target: :alt: DeepSource Active Issues

.. image:: :target: :alt: DeepSource Resolved Issues

.. image:: :target: :alt: Code Climate Issue Count

.. image:: :target: :alt: Codacy Build Status

.. image:: :target: :alt: Codebeat Quality

.. image:: :target: :alt: Better Code Hub Compliance

.. image:: :target: :alt: CodeFactor

Telegram Bot for downloading MP3 rips of tracks/sets from SoundCloud, Bandcamp, YouTube with tags and artwork.

.. contents:: :depth: 2

scdlbot Usage in Telegram

Send /start or /help command to bot or refer directly to the help message <scdlbot/texts/>__.

Please report all bugs and issues and suggest your improvements to issues <>__.

Supported sites and mainly used packages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

scdlbot is standing on the shoulders of giants:

  • Telegram Bot API <>: python-telegram-bot <>
  • SoundCloud <>: scdl <>
  • Bandcamp <>: bandcamp-dl <>
  • YouTube <>, Yandex.Music <>, Mixcloud <>, and almost everything from this list <>: youtube-dl <>__

Run your own scdlbot

Installation & Configuration ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Requirements """"""""""""

Those should be available in your PATH:

  • Python 3.6+ <> (pyenv <> and poetry <>__ are recommended)
  • FFmpeg 4.0+ <> if not running on Heroku (fresh builds for Windows, macOS <> and Linux <>__ are recommended)
  • Heroku CLI <>__ is recommended if you want to deploy to Heroku

Install / Update stable from PyPI <>__ (recommended) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


pip3 install scdlbot --upgrade

...or get unstable from Git source repository <>__ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


git clone
cd scdlbot
pip3 install --requirement requirements.txt

# Update:
git pull
pip3 install --requirement requirements.txt

Configure Bot """""""""""""

Download or copy configuration file sample and set up config environment variables in it:


# If you've installed from PyPI - download sample config somewhere:
curl -o .env

# If you've got Git source - just copy sample config:
cp .env.sample .env

# Use your favourite editor. Sample config is self-documented:
nano .env

Telegram Bot Settings """""""""""""""""""""

Send the commands from respective filenames in telegram_settings dir to @BotFather <>__, choose your bot and copy corresponding values in order to use the bot conveniently. Disable privacy mode if you want bot to read and check every message in group for links. Otherwise, it would work only for commands.

Running Locally or at Dedicated Server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Using Heroku Local <>__ (preferred) """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

You will need Heroku CLI <>__ installed.


# If you've installed from PyPI - download Procfile first (otherwise already present in Git repository):
curl -O

# For long polling mode (USE_WEBHOOK=0):
heroku local -e .env worker
# For webhook mode (USE_WEBHOOK=1):
heroku local -e .env web

Using Python only """""""""""""""""


export $(grep -v '^#' .env | xargs)
python3 -m scdlbot
# or in one line:
env $(grep -v '^#' .env | xargs) python3 -m scdlbot

# If you've installed package from PyPI into the system,
# you can also replace 'python3 -m scdlbot' with pure 'scdlbot'

Deploying to Heroku <>__ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Register on Heroku, press the button above and configure variables for deploying. When app is deployed you must set only one dyno working on "Resources" tab in your app settings depending on which way of getting updates <>__ you have chosen and set in config variables: worker for polling or web for webhook.

Manually """"""""

You can do the same as the button above but using Heroku CLI <>__, not as much of a fun. Assuming you are in scdlbot repository directory:


heroku login
# Create app with Python 3 buildpack and set it for upcoming builds:
heroku create --buildpack heroku/python
heroku buildpacks:set heroku/python
# Add FFmpeg buildpack needed for youtube-dl & scdl:
heroku buildpacks:add --index 1 --app scdlbot
# Deploy app to Heroku:
git push heroku master
# Set config vars automatically from your local .env file
heroku plugins:install heroku-config
heroku config:push
# Or set them manually:

If you use webhook, start web dyno and stop worker dyno:


heroku ps:scale web=1 worker=0
heroku ps:stop worker

If you use polling, start worker dyno and stop web dyno:


heroku ps:scale worker=1 web=0
heroku ps:stop web

Some useful commands:


# Attach to logs:
heroku logs -t
# Test run ffprobe
heroku run "ffprobe -version"

Deploying to Dokku <>__ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Use Dokku (your own Heroku) installed on your own server. App is tested and fully ready for deployment with polling (no webhook yet).


export DOKKU=<your_dokku_server>
scp .env $DOKKU:~
ssh $DOKKU
    export DOKKU=<your_dokku_server>
    dokku apps:create scdlbot
    dokku certs:generate scdlbot scdlbot.$DOKKU
    dokku config:set scdlbot $(cat .env | xargs)
git remote add dokku dokku@$DOKKU:scdlbot
git push dokku master
ssh $DOKKU
    dokku ps:scale scdlbot worker=1 web=0
    dokku ps:restart scdlbot

.. |Deploy| image:: :target:

Rate & Review

Great Documentation0
Easy to Use0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Unwelcoming Community0