Youtubify is a bundle of scripts allowing to download and organize the songs you have in your playlists on Spotify from Youtube onto your computer saving you approximately 7$ per month. Features:
- intelligent AI that verifies Youtube links before downloading
- semi-automatic visual verification of Youtube links with browser popups
- selection of playlists to be downloaded
- creation of mashup playlists of multiple spotify playlists
- automatic
idv3tagging based on spotify metadata - scalable design - out of 2000 songs only a hundred need manual verification
To run this bundle of scripts you need to:
- clone this repository with
git clone git@github.com:Henri-Laiho/youtubify.git - ensure you have python3 installed and in use (on linux debian with
sudo apt install python3). You can verify your version withpython --versionorpython3 --version. You can verify which executable of Python is used withwhich python/which python3(linux/mac) orwhere.exe python/where.exe python3(windows) - ensure you have ffmpeg installed and in use (on linux debian with
sudo apt install ffmpeg) - ensure you have installed every python package in
requirements.txtwithpip3 install -r requirements.txtcommand in the repository root directory. - have enough disk space for the songs to be downloaded
- (optional) to save music in a different directory or if you have spotify local files in your playlists: copy/rename
./conf/conf_private.py.exampleto./conf/conf_private.pyand edit it to specify folders for music files & generated playlist files - (optional) to get playlist files copy/rename
./conf/conf_playlist_export.py.exampleto./conf/conf_playlist_export.py; to get playlist files that work on another device, edit this file and specify the music file directories on the other device.
- run
python spotify_import.pyand log in with your (free) spotify account - run
python youtubify.py listto list your playlists - run
python youtubify.py activate <put playlist number here>to select a playlist you want to download (e.g.python youtubify.py activate 0will select your liked songs). Run it again with a different number to add another playlist. Runpython youtubify.py listagain to see selected playlists indicated by+. - run
./fast_youtubify.ps1, it will ask you to verify youtube links for ~5% of the songs. When it opens a youtube video with good quality, just press enter twice in the terminal, otherwise paste a better youtube (or soundcloud) link that matches the song into the terminal. You can skip this step and proceed to downloading 95% of the songs by typingabortin the terminal when it asks you to verify a link. - wait for the download to finish
You can review all steps to download music with cat fast_youtubify.ps1:
python spotify_import.pysaves data about your playlists on your local computerpython youtubify.py convertfinds Youtube links and saves them on your computerpython youtubify.py reviewallows you to select and correct suspicious Youtube links with a interactive CLI UIpython download.pydownloads all music you selectedpython metadata.pyadds idv3 metadata and album art with python librarymusic_tagpython playlist_export.pycreates M3U8 playlist files readable by most conventional players
In all cases python youtubify.py --help can answer most questions.
Ping @henri-laiho.
This file simply takes Spotify metadata and processes it.
flowchart LR
init["INIT SCRIPT"] --> begin["read arguments and create storage"];
subgraph src/persistance/track_data.py
begin --> add_arg["add arguments"];
subgraph Storage class
begin --> init_store["initialize storage by reading a file to memory"]
init_store --> set_data["set some data to static variables of the Storage class"]
set_data --> begin
end
end
begin --> try["try to download Spotify data"];
subgraph src/utils/bunch.py
try --> hold_conf["hold configuration in an object"]
hold_conf --> try
end
subgraph src/spotify/spotify_backup.py
try --> get_token["try to get token and spotify data with config in bunch object"]
get_token --> file_check["check for output file"]
file_check --> log_in["log in and show user info"]
log_in --> gather_data["gather song data from file"]
gather_data --> write_data["write data to a file"]
end
write_data --> return_token["return Spotify token"]
return_token --> try
try --> save['save to storage on success'];
This is for education or personal use purposes only.