Skip to content

Transform any playlist from 89.3 The Current into a Spotify playlist

Notifications You must be signed in to change notification settings

clintmcmahon/currentify

Repository files navigation

Currentify

Currentify is a Python library that takes parses playlists from 89.3 The Current (https://thecurrent.org) and turns them into a Spotify playlist.

Prerequisites

Python3 (Python2 will require a couple code changes)

Spotify account

Spotify API Credentials

Depends

pip3 install beautifulsoup4
pip3 install spotipy
pip3 install requests
pip3 install pytz

Installing

Clone this repository

git clone https://github.com/clintmcmahon/currentify

Change directory to currentify

cd currentify

Create a local_config.py file and populate with your values. Your file should look like this

Create the Client_Secret and Client_Id at https://developer.spotify.com

#!/usr/bin/env python
#encoding: utf-8

SPOTIFY_USERNAME = [your Spotify username]
SPOTIFY_CLIENT_SECRET = [your Spotify API Client Secret]
SPOTIFY_CLIENT_ID = [your Spotify API Client ID]
SPOTIFY_SCOPE = 'playlist-modify-public playlist-modify-private playlist-read-collaborative'
SPOTIFY_REDIRECT_URI = 'http://localhost'

Run the code

python3 main.py [playlist_name, start_date, end_date, playlist_description]

A browser window will automatically open where you will authenticate with Spotify. After you've given access to your Spotify account the browser will redirect to a http://localhost url. Copy the localhost url and paste it into the command line. You'll only need to do this once, the code will create a cache authentication file on your local machine.

After you've authenticated the program will read playlist and either create a new playlist or delete the contents of the existing playlist before adding the latest tracks from the website.

Built With

Acknowledgments

About

Transform any playlist from 89.3 The Current into a Spotify playlist

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages