Skip to content
/ ytmp3 Public

A simple script to download spotify playlist as MP3

License

Notifications You must be signed in to change notification settings

Yoshk4e/ytmp3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

YT-MP3 Downloader (it's mainly for spotify)

A Python script that allows you to download audio from YouTube videos and spotify playlists and convert them to MP3 format using yt_dlp and pydub.

Features

  • Downloads audio from YouTube videos in MP3 format.
  • Allows batch downloading from a list of URLs.(spotify option)
  • Outputs high-quality MP3 files.

Requirements

  • Python 3.9+
  • Libraries:
  • spotipy
  • aria2c: (optional but faster)
    • yt_dlp: For downloading YouTube videos.
    • pydub: For converting and handling audio files.
    • ffmpeg or libav: Required by pydub for audio processing.

Installation

  1. Clone the repository:
    git clone https://github.com/Yoshk4e/ytmp3.git
    cd ytmp3

Install the required Python libraries:

pip install yt_dlp pydub spotipy

Install ffmpeg:

Windows

Download from FFmpeg.org and add it to your PATH.

Linux:

sudo apt update
sudo apt install ffmpeg

MacOS:

brew install ffmpeg

Install aria2c:

install chocolaty in powershell first by using:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Then type in powershell:

choco install aria2

or

choco install aria2c

Run the script:

python ytmp3.py

THE SCRIPT USES A LICENSING SYSTEM

I'm very sorry but i had to do this because if i die the server will stop after some time

SO

I'M NOT RESPONSIBLE OF WHAT YOU DO WITH THE SCRIPT IF I DIED AND YOU REMOVED THE LICESNSING LOGIC

LICENSE:

LICENSE-WR2KL8Z9XVM

NOTE: YOU SHOULD GET YOUR CLIENT_ID AND CLIENT_SECRET FROM SPOTIFY DEVS WEBSITE AND CHANGE THEM IN THE SCRIPT ACCORDINGLY

THIS SCRIPT IS AN OLD COLLAB BETWEEN ME AND ONE OF MY BSFs

@Known Issues

Some videos may not download due to region restrictions or YouTube's protections. Use a VPN or proxy if needed.

The update function is broken for some reaseon feel free to fix it as of now i can't fix it so just manual update

Contributions

Contributions are welcome! Feel free to fork this repository, make changes, and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Disclaimer

This script is intended for personal use only. Ensure compliance with YouTube's Terms of Service.