This will take a pandora station and convert it to a spotify playlist. It has a few manual bits you need to enter, but beyond that, it should just work!
##How to run pandora2spotify
sh pandora2spotify.sh <pandora_station_id> <temp_file_to_put_artists_songs> <spotify_username> <spotify_playlist_id> <oauth_token>
Below I outline how to get the necessary arguments if you don't know how to find them yourself
##Limitations
- Written in bash and awk, because I like them, no other reason
- Searching spotify's song database isn't the smartest, this just grabs the first result
- No real error checking or hand holding when calling
- Produces a fair bit of output to the console while running
- The temp file name that you pass in is to store the html curled from pandora and then parse it using awk to get a list of artists and tracks, which is then used to grab spotify uris for each track
##Instructions
- Log into pandora and find the station id you will want to copy
- Choose a station and view station details, your url should change to show the station id
- Should be an integer, eg. 22947617204321760
- Sometimes it may not change, then you'll need to use developer tools to find the station id
- Next you'll need to create a new playlist on spotify
- Grab the id of the playlist
- This will be in the url after you create the playlist
- This will be a long string of characters, eg. 71AYLmXpcaikNHdZU2sagc
- Now you'll need an oauth token
- I generated mine by going to https://developer.spotify.com/web-api/console/post-playlist-tracks/
- Scroll down until you see "GET OAUTH TOKEN", click that, you'll need to log in 1. You'll need to request the playlist-modify-private scope
- After you log in that input will have a value and you'll need that to use this
- The oauth tokens generated don't last very long, so before running make sure to use a fresh one
- ????
- Profit!