From e4359b5b444cb0bf642e466d2394dfd02331f7ab Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Thu, 1 Dec 2016 22:08:37 -0500 Subject: [PATCH] add dev excuses --- app.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app.rb b/app.rb index 63bb3ef..eecc96c 100644 --- a/app.rb +++ b/app.rb @@ -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