Ready-made playlist downloader for YouTube + Yandex Music
Essentially, a ready-to-go script for downloading music from YouTube + Yandex Music.
The script correctly processes links, bypasses the structural limitations of Yandex playlists thanks to yandex.ts, and organizes everything neatly.
- Automatic conversion of short Yandex Music links into full playlist paths via a Deno layer.
- Automatic embedding of metadata and album covers into files.
- Maintenance of a local download database (
.downloaded.txt) to avoid duplicates. - Use of your browser sessions to bypass authorization and access playlists in high quality (Yandex only).
Three components are required:
- yt-dlp: The core download engine.
- Deno: Mandatory for the
yandex.tsmodule (link parsing logic). - ffmpeg: Yep. This whole repo is basically a meme.
- Clone the repository.
git clone https://github.com/mnnoee/yt-dlp_scripts.git- Make the script executable:
chmod +x audio_grab.sh- Ensure
denois available in your$PATH.
Deno is seriously mandatory. I managed to extract the user and playlist number using regex, but then I got hit with "An annoying CAPTCHA appeared."
./audio_grab.sh [OPTIONS] URL1 [URL2 ...]Download a track with default settings (Chrome, Opus):
In this case, you should use a playlist with a UUID for correct parsing right away.
./audio_grab.sh https://music.yandex.ru/playlists/1a1a11aa-a111-11a1-aa11-1aa11111aaaaDownload to a specific directory using Firefox:
./audio_grab.sh -b firefox -d ~/Music/MyCoolCatalog https://youtube.com/watch?v=abcUsing a proxy to bypass regional restrictions:
./audio_grab.sh -p socks5://127.0.0.1:1080 https://music.yandex.ru/playlists/1a1a11aa-a111-11a1-aa11-1aa11111aaaaActually, it supports both UUIDs and regular playlists like:
https://music.yandex.ru/users/username/playlists/1
| Flag | Description | Default |
|---|---|---|
-d, --dir |
Save directory | /workdir/audio |
-f, --format |
Audio format (mp3, opus, m4a) | opus |
-q, --quality |
Quality (0 — best, 10 — worst) | 0 |
-b, --browser |
Browser to import cookies from | chrome |
-p, --proxy |
Proxy server URL | none |
The script automatically organizes files:
- Yandex :
Artist/Track_Name.ext - YouTube:
Channel/Video_Title.ext
When using Yandex Music without an active subscription, the maximum bitrate is limited (~190kbps). To get the highest quality, make sure you are logged in on the selected browser.
This project is released into the public domain using The Unlicense. Feel free to use, modify, and distribute it for any purpose.