Converts YouTube Playlists to Spotify URI lists - in your Terminal.
This is currently in development stage!
config.php
composer install
to load the required packages$ php yt2spotify.php [YouTube playlist-URL | YouTube playlist-ID] [--copy] [--only-uri]
--copy
: Copies the spotify URIs to your clipboard--only-uri
: Prints only fetched URIs (one per line)Note: --copy
works only on Mac OS X with the pbcopy
-binary
Example:
$ php yt2spotify.php PL6D4C31FFA7EBABB5
It's very simple - The scripts loads all video-titles (= name of the track) of the provided YouTube-playlist with the YouTube Data API v3 and searches this tracknames with Spotifys WebAPI - if the track was found the script will show you a green checkmark next to the title, if not - a red cross. All found Spotify-URIs (like spotify:track:3GfOAdcoc3X5GPiiXmpBjK
will be written per line in spotify-uris.txt
) – Now you can just copy the contents of this file and paste it (from your clipboard) in an playlist in your spotify-client.
The problems:
config.yml
)