Skip to content

This script downloads your Spotify liked songs as MP3 files. It uses the Spotify and YouTube APIs to retrieve your liked songs, search for matching videos, and download the audio. Features include authentication, video search, MP3 conversion, and local file saving. Prerequisites are Python 3.x, Spotify credentials, and a YouTube API key.

Notifications You must be signed in to change notification settings

ANUPAM-SINGH10/Spotify-to-YouTube-Sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Spotify to YouTube Sync This Python script allows you to download your liked songs from Spotify as MP3 files using YouTube videos. It utilizes the Spotify API to retrieve your liked songs, searches for the corresponding videos on YouTube using the YouTube Data API, and downloads the videos as MP3 files using the yt_dlp library. Prerequisites Before running this script, you'll need to have the following installed:

Python 3.x FFmpeg (https://ffmpeg.org/download.html)

Additionally, you'll need to install the required Python libraries by running the following command: Copy codepip install spotipy google-api-python-client yt-dlp Setup

Clone this repository to your local machine:

Copy codegit clone https://github.com/your-username/spotify-to-youtube-downloader.git

Navigate to the project directory:

Copy codecd spotify-to-youtube-downloader

Open the main.py file and update the following variables with your own credentials:

pythonCopy codeSPOTIFY_CLIENT_ID = 'your_spotify_client_id' SPOTIFY_CLIENT_SECRET = 'your_spotify_client_secret' YOUTUBE_API_KEY = 'your_youtube_api_key' You can obtain the Spotify client ID and client secret by creating a new application on the Spotify Developer Dashboard. The YouTube API key can be obtained from the Google Cloud Console.

Update the external_downloader path in the download_video() function to match the location of your ffmpeg.exe file.

pythonCopy code'external_downloader': r'path/to/your/ffmpeg.exe', Usage To run the script, execute the following command: Copy codepython main.py The script will authenticate with the Spotify API, retrieve your liked songs, search for the corresponding videos on YouTube, and download the videos as MP3 files in the same directory as the script.

About

This script downloads your Spotify liked songs as MP3 files. It uses the Spotify and YouTube APIs to retrieve your liked songs, search for matching videos, and download the audio. Features include authentication, video search, MP3 conversion, and local file saving. Prerequisites are Python 3.x, Spotify credentials, and a YouTube API key.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages