add dev excuses

This commit is contained in:
Tommy Parnell
2016-12-01 22:08:37 -05:00
parent 0371332770
commit e4359b5b44

7
app.rb
View File

@@ -39,6 +39,13 @@ post '/' do
end
def get_excuse
rando = Random.rand(0..1)
if rando == 0
url = "http://programmingexcuses.com/"
end
if rando == 1
url = "http://www.devexcuses.com/"
end
page = Nokogiri::HTML(open("http://programmingexcuses.com/"))
page.css("a").text
end