Inspiration

We came up with this idea a few months ago, frustrated with the current system in which Spotify allows you to listen to music. Listening offline was a struggle and our mobile data bandwidth continuously increased. Other solutions of downloading individual files off of YouTube was extremely tedious.

What it does

With our hack, users are able to log in to our website with their Spotify accounts and select the playlist they would like the download as a .ZIP file.

How we built it

Our underlying technology is based on a combination of Spotify APIs, YouTube scrapers, and the FFMPEG Library. We were able to gather data for each user using Spotify APIs and create a database of their tracks and playlists. From there, we scraped YouTube for the best audio quality video based on certain keywords and ran it through the FFMPEG library to extract audio. Lastly, we took their files and zipped them up for easier access.

Challenges we ran into

Initially, we started off by trying to create a Chrome extension rather than a full-fledged website. This would entail a lot less database management, etc, on our end. However, we soon learned that Spotify has a method of blocking Chrome extensions or any scripts besides their own running on their website. We decided to pivot and create our full-fledged platform. We also ran into issues with the runtime of the application towards the end. It would take a long time to download multiple audio files and such.

Accomplishments that we're proud of

After coming up with this project idea a few months ago, we didn't really think it would be feasible or possible. However, after researching different APIs and different methods of approaching our problems, we were able to succeed and make this a platform that we could, theoretically, use in the future.

What we learned

We learned a lot about jQuery and AJAX as well as a lot of UNIX file system handling. In the past, we haven't had as much experience with either of those things and through this project, we were also able to learn about how Javascript is able to scrape data from websites and how FFMPEG can contribute to the compression of audio files.

What's next for Spotify Hacks

In the future, we hope to create a fully-functional scraper using Python instead of Javascript. This would allow us to be independent of Spotify APIs and could also open the potential for a future Chrome extension.

Share this project:

Updates