From 478f17034e0aadcd5aec75d48717fb397f124820 Mon Sep 17 00:00:00 2001 From: Jeffrey Middleton Date: Tue, 10 Mar 2009 08:49:46 -0500 Subject: [PATCH] Fixed lyricwiki plugin LyricWiki returns a page with "Not found" in place of the song lyrics if the song is not found; check for this. --- lyrics/02-lyricwiki.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lyrics/02-lyricwiki.rb b/lyrics/02-lyricwiki.rb index a90cb2a..9c9f663 100755 --- a/lyrics/02-lyricwiki.rb +++ b/lyrics/02-lyricwiki.rb @@ -29,4 +29,5 @@ url = "http://lyricwiki.org/api.php" + \ response = Net::HTTP.get(URI.parse(url)) exit(2) unless response =~ /
\s*(.*?)\s*<\/pre>/im
+exit(2) if $1 == "Not found"
 puts $1
-- 
2.30.2