Skip to main content

A Python package to download Spotify playlists locally including the cover art, metadata and lyrics by leveraging the Spotify, YouTube and Genius APIs.

Project description

Spotube

Spotube is a Python package that allows the user to download local .mp3 copies of Spotify playlists, including cover art, artist information and lyrics.

Description

The package can be used to download Spotify playlists, retrieving and pairing each song with the cover art as seen on Spotify, as well as any relevant metadata. The user provides the link to a public spotify playlist, API keys for Spotify and Genius, and, optionally the directory to save the downloaded songs. The application will then:

  • Query the Spotify API for information on each song in the playlist, including the official name, artists, album cover art etc.
  • Using the song name and artist(s), search for, and select the most relevant song video on Youtube. If possible, the application will avoid remixes, covers and video clip versions.
  • Using the most relevant link, download the video in the highest possible quality, and convert to .mp3 format.
  • Query the LyricsGenius API to retrieve the song lyrics, if available.
  • Edit the .mp3 tags of the downloaded song to set the artist and album information, add the lyrics and set the cover art.

Obtaining API keys

For instructions on how to generate the two sets of API keys needed to run the application, please refer to:

Dependencies

In order to convert the YouTube videos to .mp3 format, you need to have ffmpeg installed in your system. To do this, follow the instructions relevant to your system:

Ubuntu:

sudo apt install software-properties-common
sudo apt update
sudo add-apt-repository ppa:jonathonf/ffmpeg-4
sudo apt install ffmpeg

Windows:

  • Download ffmpeg from the ffmpeg downloads page
  • Extract the downloaded archive
  • Add the directory where ffmpeg was extracted to the PATH

Installation

To install the package using pip:

pip install spotube

Instructions and Examples

This section is under construction.

Disclaimer

Spotube is aimed strictly at personal use, as per the YouTube, Spotify and LyricsGenius license agreements. Sharing the content collected by using this application, or using it for profit is strictly prohibited. For more information, please read the LICENSE file included with this distribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotube-0.0.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

spotube-0.0.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file spotube-0.0.1.tar.gz.

File metadata

  • Download URL: spotube-0.0.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for spotube-0.0.1.tar.gz
Algorithm Hash digest
SHA256 929f1b9bf30d8a94797d2817e7e2577cb80b18ccc550aab1e8a9c6d2cd7281df
MD5 480518dc16b8e3af4c04199b1bf16897
BLAKE2b-256 a0dc86c02a19bd54a742b72bf450239bfb3d9c5ed16f69e46a25be5126d0a0c1

See more details on using hashes here.

Provenance

File details

Details for the file spotube-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: spotube-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for spotube-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57d1d24ced21f413db281b60be7f0877e7d4e025e88fe26f6be2ee754aab0f33
MD5 dd4e4c08abfd1424005da52e63c43073
BLAKE2b-256 3df8b079485f93f291e8b186661dca0ae8feadbf0fe42dd91070374beb3f400f

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page