Last active
August 29, 2015 14:14
-
-
Save gdiggs/b8c20c17f227ce7551d2 to your computer and use it in GitHub Desktop.
Get current song and show on WFMU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
url = 'http://wfmu.org/currentliveshows_aggregator.php?ch=1,4,6,7,8&_=1422680555670' | |
body = open(url) | |
document = Nokogiri::HTML(body) | |
song = document.css('.bigline')[0].text.gsub(/[\n\r]/, ' ').strip | |
show = document.css('.smallline')[0].text.gsub(/[\n\r]/, ' ').strip | |
puts "#{song} #{show}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment