13 June 2024 Status Update: WORKING
downloads songs from spotify by searching them on youtube along with adding meta
NOTE: If this projects seems ded ie. no commits for months, years, it is not. it's just working without any issues and you should probably ignore the to do list below
install ffmpeg if you are on linux
sudo apt install ffmpeg
- Fork/Clone/Download this repo
https://github.com/Silent-Crafter/spotify-downloader
- Navigate to the directory
cd spotify-downloader
- Create a virtual environment for this project
python3 -m venv venv
- Load the virtual environment
- On Windows Powershell:
.\venv\Scripts\activate.ps1
- On Linux and Git Bash:
source venv/bin/activate
- Run
pip install .
OR
if you are on windows, download and extract the zip from the Releases page to a convinient location eg. C:\ , and add the location of extracted zip file to path.
NOTE: Any personalized spotify playlists like daily mix or artist mix will not work. You will have to fork the repo and modify the code to provide your cookies
run python3 spotify_downloader [url]
for linux (from the same github directory)
windows users need to add .exe
after spotify-downloader
. i.e. spotify_downloader.exe [url]
.
input the asked values
for path, specify the path for the directory in this fashion:
C:\Music\Spotify
OR
/home/username/Music
(for linux) (DONT USE ~ TO INDICATE HOME DIR)
NOTE : Do not add a slash at the end of the directory as shown in the example
you can also use spotify_downloader as a python module by importing it into your scripts. (Docstrings coming soon for help)
the program will ask you for mode/method.
ITS FINE IF YOU JUST LEAVE IT BLANK. THE DEFAULT MODE IS 't'
- n : normal mode/method. searches song normally.
- t : topic mode/method. Searches for the music autogenerated by youtube. these don't have a video, only audio that too of the song only. DEFAULT MODE
- a : audio mode/method. add (Official Audio) to further enhance the search term for youtube. serves the same purpose as t mode.
Recommended is the topic mode. it works for must of the time. but in case if it dosen't use n or a respectively.
- Doctrings
- parallel downloading