Coder Social home page Coder Social logo

sarkar-sayan / spoti-tube Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ky13-troj/spoti-tube

1.0 0.0 0.0 62 KB

Spoti-Tube is a lightweight Python script designed to download songs from a Spotify playlist without premium membership.

Home Page: https://spoti-tube.vercel.app

License: MIT License

JavaScript 13.55% Python 50.50% CSS 6.60% HTML 29.35%

spoti-tube's Introduction

Spoti-Tube

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.

Features

  • 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.

Note:

  • 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!

Setup

Before using Spoti-Tube, you need to set up your environment by following these steps:

  1. Clone the repository:

    git clone https://github.com/ky13-troj/Spoti-Tube.git
    cd spoti-tube
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. 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 and your_spotify_client_secret with your actual Spotify API credentials.

Usage

1. Execution

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
  1. Let Spoti-Tube handle the rest.

  2. Spoti-Tube will then fetch the playlist information and search for corresponding songs on YouTube.

  3. The script will start downloading the songs in MP3 format to the music directory, & create a directory using the playlist name.

Notes

  • 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.

Disclaimer

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.

Future Visions of Spoti-Tube

1. Creation of a Python API:

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.

2. Development of a Mobile App:

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.

3. Cross-Platform Compatibility:

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.

4. User Accounts and Cloud Integration:

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.

5. Enhanced Search and Metadata Handling:

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.

6. Real-Time Collaboration:

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.

7. Integration with Music Streaming Services:

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.

8. Integration with Smart Devices:

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.

9. Continuous Updates and Community Contributions:

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

spoti-tube's People

Contributors

ky13-troj avatar

Stargazers

Sayan Sarkar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.