Skip to content

debjit-bw/spotify-playlist-adder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spotify-playlist-adder

this code was written for our discord server "music junction" to preserve playlists

raw.txt

contains groovy queues. for any other music provider, clean.py's cleaning functions need to ne changed appropriately

preview:

  1. Andrew Bird - Three White Horses 3:24
  2. The Beatles - Eight Days A Week 2:44
  3. Blackbird (Remastered 2009) 2:19
  4. Green Day - 21 Guns 5:27
  5. One Direction - 18 4:09
  6. 18 - EXES 4:01
  7. Alessia Cara - Four Pink Walls 3:32
  8. Cold War Kids - First 3:18
  9. Lukas Graham - 7 Years 4:00
  10. Queen - Another One Bites the Dust 3:43
  11. When The End Comes - Official Studio… 5:55

clean .py

cleans data from raw.txt and puts them in cleaned.txt

preview:

andrew bird three white horses

the beatles eight days a week

blackbird

green day 21 guns

one direction 18

18 exes

alessia cara four pink walls

cold war kids first

lukas graham 7 years

queen another one bites the dust

when the end comes studio

final .py

creates the final playlist. you need to have the proper environment variables available in your terminal. you technically can edit some code to create a new playlist rhrough code, but i generally create a playlist at spotify.

it reads from cleaned .txt and searches spotify and adds the first search result into the playlist (playlist_id). beware avout permissions though. the scope "playlist-modify-private" can add only to pvt playlists. change the scope according to your needs.

songs that couldn't be added get added to logs .txt as well as printed onto the terminal.

About

Add a list of songs directly into a Spotify playlist with python

Topics

Resources

License

Stars

Watchers

Forks

Languages