This web app scrapes data from various music charts around the world (NZ, Australia, USA), which is then used to create Spotify playlists of the top charting songs.
Run on terminal:
pip3 install -r requirements.txt
- Create a Spotify developer account
- Create new application on https://developer.spotify.com/dashboard/applications
- Make note of your Client ID and Client Secret
- The Spotify developer website has a good tutorial on this
Using your Client ID and Client Secret from the previous step, set your variables in the terminal:
export SPOTIFY_CLIENT_ID='{Your client ID}'
export SPOTIFY_CLIENT_SECRET='{Your client secret}'
(note: 'export' should only be used for Mac or Linux machines. In Windows, replace 'export' with 'set')
Then, run the app:
set FLASK_APP=app
flask run
The first time the application is run, you will be taken to login with your Spotify account:
Once logged in, you will see the homepage:
Here, you can select which chart you want to create a playlist from:
Then enter a name and description for your playlist and submit:
Finally, a playlist will be created on your Spotify account, and the link to it will be embedded onto the web page for easy access