Sunnify is a Spotify downloader application that allows you to download entire playlists locally onto your Mac/Linux/Windows PC.
Below are screenshots demonstrating the Sunnify application in action, downloading my personal Spotify playlist.
- Python 3.6 or above installed on your system. If not installed, download and install Python from python.org.
- Ensure that pip, Python's package manager, is installed. It usually comes with Python. You can verify by running
pip --version
in your terminal.
If you're using Windows, you can directly download the executable file from here
Clone the repository:
git clone https://github.com/sunnypatell/sunnify-spotify-downloader.git
Navigate to the project directory:
cd sunnify-spotify-downloader
Install the required dependencies:
pip install -r req.txt
Run the application:
python Spotify_Downloader.py
- Launch the Sunnify application.
- Enter your Spotify playlist URL in the provided input field.
- Check show preview box to see progress
- Check metadata box if you want to download cover art, author, album, release-date etc...
- Press enter in the URL field to start downloading.
- The downloaded songs will be saved in the media directory (wherever your source or executable is located).
Sunnify utilizes the following Python libraries:
- PyQt5: Used for the GUI interface.
- webbrowser: Used to bypass Spotify Network Traffic Detection.
- requests: Used for making HTTP requests.
- mutagen.id3: Used for editing ID3 tags and scraping metadata.
If you encounter any issues while running Sunnify, try the following steps:
- Ensure that you have a stable internet connection.
- Verify that you have entered the correct Spotify playlist URL.
- Check if there are any updates available for Sunnify. You can pull the latest changes from the repository and reinstall the dependencies.
git pull
If you want to run the Sunnify web app locally, follow these steps to set up both the backend and frontend:
-
Navigate to the
web-app/sunnify-backend
directory in your terminal:cd web-app/sunnify-backend
-
Install the required dependencies if not done already:
pip install -r requirements.txt
-
Run the backend server:
python app.py
Alternatively, you can use:
python -m app.py
This will start the backend on
http://127.0.0.1:5000
.The backend communicates with the frontend using Flask to create API endpoints and Flask-CORS to handle Cross-Origin Resource Sharing (CORS), allowing API requests between the frontend and backend across different domains.
-
Once the backend is running, navigate to the
web-app/sunnify-webclient
directory:cd ../sunnify-webclient
-
Install the required frontend dependencies:
npm install
-
Start the frontend development server:
npm run dev
The frontend will now be running locally on
http://localhost:3000
and can communicate with the backend onhttp://127.0.0.1:5000
.
- ⚛️ React: Used for building the user interface components.
- 🚀 Next.js: Provides the framework for server-side rendering and routing.
- 🎨 Tailwind CSS: Used for styling and responsive design.
- 🧩 shadcn/ui: Provides pre-built, customizable UI components.
- 🔍 Lucide React: Used for icons throughout the application.
- ⚙️ React Hooks: Utilized for state management and side effects.
- 🌐 Fetch API: Used for making HTTP requests to the backend.
- 🎧 Web Audio API: Implemented for audio playback functionality.
- 🐍 Flask: Python web framework for creating the API endpoints.
- 🔓 Flask-CORS: Handles Cross-Origin Resource Sharing (CORS) for API requests.
- 🔗 Requests: Used for making HTTP requests to fetch playlist data.
- 🎵 Mutagen: Used for editing ID3 tags and scraping metadata.
- 🕸️ BeautifulSoup: Used for web scraping and parsing HTML content.
- 🆔 UUID: Generates unique IDs for tracks and analysis processes.
- 🕵️♂️ User-Agent: Emulates real browser activity to bypass protection mechanisms.
- 🤖 Selenium: Used for browser automation and emulating user interactions.
- 🎥 FFmpeg: Handles audio conversion and processing.
- 🔒 CORS Handling: Implemented to allow cross-origin requests securely.
- 🆔 ID Generation: Unique IDs are generated for tracks and analysis processes.
- 🛡️ Browser Headers Emulation: Mimics real browser headers to avoid detection.
- 📊 Playlist Metadata Retrieval: Fetches and processes playlist information.
- 🕸️ Web Scraping: Extracts necessary data from web pages.
- 👨💻 Real Browser Activity Emulation: Simulates human-like browsing patterns.
- 🔄 User-Agent Rotation: Regularly changes user-agent strings to avoid blocking.
- 🛣️ Flask Routing: Handles various API endpoints for different functionalities.
- ⚡ Asynchronous Processing: Manages concurrent downloads and processing tasks.
- 🚨 Error Handling: Robust error management for various scenarios.
The backend for Sunnify is hosted on Render under the free compute plan. If there hasn't been an API call to the Render-hosted backend for a while, it might "fall asleep" and take a moment to wake up when the frontend sends a request (e.g., downloading a playlist). Please be patient as it may take a few seconds for the backend to wake up and process the request.
I'm currently working on integrating Sunnify with iTunes for seamless transfer of downloaded music to iOS devices, specifically adding them to the Apple Music library. Additionally, I'm also working on adding support for Android filesystems to enable direct transfer of downloaded music to Android devices.
Stay tuned for these exciting updates, which will enhance the functionality of Sunnify and provide a more seamless experience for users across different platforms.
Sunnify (Spotify Downloader) is intended for educational purposes only. It is your responsibility to ensure that you comply with copyright laws and regulations in your country or region. Downloading copyrighted music without proper authorization may be illegal in certain jurisdictions.
Sunnify (Spotify Downloader) is developed and maintained by Sunny Jayendra Patel. For inquiries, suggestions, or feedback, please contact Sunny at [email protected].
This project is licensed under the Custom License. See the LICENSE file for details.
If you encounter any bugs, have feature requests, or would like to contribute enhancements, feel free to submit a pull request on GitHub.
If you encounter any issues while using Sunnify, please open an issue on GitHub. Be sure to include detailed information about the problem, including steps to reproduce it and any error messages you may have encountered. Your feedback helps me improve the application for everyone else.