Skip to content

othellodesutter/nts-tracklist-to-spotify-playlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTS tracklist to Spotify playlist

Script to convert the tracklist of a given NTS radio show into a Spotify playlist on the account of the user that is logged in (using oauth2). Frontend using FastApi, backend using Spotipy and BeautifulSoup.

Installation

Install the requirements (BeautifulSoup, Spotipy, FastApi etc.) by using pip.

pip install -r requirements.txt

Configuration

Make a new file in the main directory called config.py with the following structure:

config = {
    'scope': 'user-read-private playlist-modify-public playlist-modify-private ugc-image-upload',
    'client_id': '',
    'client_secret': '',
    'redirect_uri': 'http://localhost:8000/callback',
    'session_middleware_key': ''
}

On the dashboard of the Spotify for developers site, make a new app and copy the client_id and client_secret to the config.py file and add the redirect_uri to the app settings (and don't forget to save them). Generate a random key to use for the session and paste it into the same file for the session_middleware_key.

Usage

Launch the application by using one of the following commands:

uvicorn main:app
python3 main.py

Access the site by browsing to localhost:8000 in your browser. Paste the url of your favorite NTS show and enjoy your fresh Spotify playlist!

About

Script to convert the tracklist of a given NTS radio show into a Spotify playlist on the account of the user that is logged in (using oauth2). Frontend using FastApi, backend using Spotipy and BeautifulSoup.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors