A super simple Ruby script to call the "Now Playing" service for a certain station and find out what is playing.
First you need to create and app at https://developer.spotify.com/my-applications/#!/applications. Set the callback to http://brooksgarrett.com/projects/radioscrap/callback.html. I don't log your tokens (it's pure HTML and javascript.)
Give the program your client ID and client secret to get your token link. Once you follow the link paste the code into the app and set debug to false.
You're ready to go!
ruby scrape.rb
I configure scrape to run from my cron every minute. Adjust as you like.
ruby playlist.rb
This command will generate your playlists. It will name the playlist after the station name.