Spoti-Tube is a Python script that allows you to download songs from a given Spotify playlist. By leveraging the Spotify API for playlist information and the pytube library for YouTube integration, Spoti-Tube seamlessly converts your favorite Spotify playlist into a local collection of MP3 files.
-
Easy Setup: Quickly set up Spoti-Tube by installing the required dependencies and configuring your Spotify API credentials in the
.env
file. -
Playlist Conversion: Input your Spotify playlist link, and Spoti-Tube will retrieve the list of songs and search for corresponding MP3s on YouTube.
-
Automatic Download: The script automatically downloads the identified songs in MP3 format to the
music
directory, organized by playlist name. -
Error Handling: Spoti-Tube gracefully handles errors during the download process, ensuring a smooth experience even in the face of occasional issues.
- Spotify Access Tokens: For initial usage, you can use my access tokens but to get your own personal access tokens visit
- First Use: While using it for the first time a youtube authentication will be initiated in case of any explicit songs. To authorize your YT account you've to go to the prompted link in the terminal & paste the code prompted in the terminal. This will be a one-time thing only. Also, I'm trying to remove this issue if anyone knows how to resolve this issue kindly contact me
Enjoy your seamless journey from Spotify playlists to local MP3s with Spoti-Tube!
Before using Spoti-Tube, you need to set up your environment by following these steps:
-
Clone the repository:
git clone https://github.com/ky13-troj/Spoti-Tube.git cd spoti-tube
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the project root directory and add your Spotify API credentials:CLIENT_ID="your_spotify_client_id" CLIENT_SECRET="your_spotify_client_secret"
Replace
your_spotify_client_id
andyour_spotify_client_secret
with your actual Spotify API credentials.
Run the Spoti-Tube script by providing the Spotify playlist link as a command-line argument:
python spoti-tube.py <playlist_link>
Replace <playlist_link>
with the actual Spotify playlist link.
# Example Usage
python spoti-tube.py https://open.spotify.com/playlist/your_playlist_id
-
Let Spoti-Tube handle the rest.
-
Spoti-Tube will then fetch the playlist information and search for corresponding songs on YouTube.
-
The script will start downloading the songs in MP3 format to the
music
directory, & create a directory using the playlist name.
-
Spoti-Tube uses the pytube library to interact with YouTube and download videos.
-
The downloaded songs will be saved in the
music
directory with the playlist name as a subdirectory. -
If an error occurs during the download, the script will continue with the next song.
Spoti-Tube is intended for personal use and educational purposes only. Ensure compliance with the terms of service of the platforms involved and adhere to local copyright laws.
Please be aware that downloading copyrighted material without permission may violate the terms of service of certain platforms and local copyright laws. Use this script responsibly and only for legal purposes.
Feel free to contribute to the project or report any issues on the GitHub repository.
Commit Changes:
- Implemented object-oriented structure for SpotiTube script in spoti_tube_class.py.
- Created classes for SpotifyDownloader, PlaylistDownloader, AudioDownloader, and SpotifyPlaylistProcessor.
- Encapsulated functionalities for Spotify API interaction, playlist details extraction, YouTube queries generation, and audio downloading.
- Improved modularity, readability, and maintainability of the codebase.
- Enhanced object-oriented design for SpotiTube script, fostering better code organization.
Transform Spoti-Tube into a robust Python API, allowing users to integrate its functionality into their own projects and applications. The API can expose endpoints for playlist conversion and song downloads, enabling developers to incorporate Spoti-Tube's features seamlessly.
Create a user-friendly mobile app for both iOS and Android platforms, providing a convenient interface for users to interact with Spoti-Tube. The app can offer features such as playlist input, download progress tracking, and local library management.
Extend Spoti-Tube's reach by ensuring compatibility with various operating systems. Besides Android, consider developing versions for iOS, Windows, and macOS, catering to a broader audience and enhancing user accessibility.
Implement user account functionality to enable personalized experiences. Users can save their playlists, track download history, and synchronize their local libraries with cloud storage services like Google Drive or Dropbox for seamless access across devices.
Improve the accuracy of song searches by implementing advanced algorithms and leveraging additional metadata. Enhance the user experience by providing more information about the downloaded songs, such as artist details, album art, and lyrics.
Introduce collaborative playlist features, allowing users to share playlists with others. Real-time updates and notifications can inform users when new songs are added or when friends are listening to the same playlist.
Explore partnerships or integrations with other music streaming services beyond Spotify. This could include popular platforms like Apple Music, Deezer, or YouTube Music, offering users more flexibility in choosing their preferred source for song downloads.
Explore integration with smart home devices and virtual assistants. Users could use voice commands to initiate playlist downloads or request information about their downloaded library.
Foster an active open-source community around Spoti-Tube. Encourage contributions, bug fixes, and feature suggestions from the community to keep the project evolving and aligned with user needs.
As Spoti-Tube evolves, these future visions aim to enhance functionality, user experience, and accessibility, making it a versatile and indispensable tool for music enthusiasts.
Feel free to contact me via Instagram