summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc4249f)
raw | patch | inline | side by side (parent: cc4249f)
author | Thomas Jansen <mithi@mithi.net> | |
Sun, 1 Nov 2009 23:49:11 +0000 (00:49 +0100) | ||
committer | Thomas Jansen <mithi@mithi.net> | |
Sun, 1 Nov 2009 23:49:11 +0000 (00:49 +0100) |
I've stumbled across several cases of obfuscated lyrics that use the numeric
HTML escape sequences.
HTML escape sequences.
lyrics/02-lyricwiki.rb | patch | blob | history |
diff --git a/lyrics/02-lyricwiki.rb b/lyrics/02-lyricwiki.rb
index b3b702825a4414f67f8c067b77d8d033bdaf06cb..db7b970307dd03d944eb76e971cedaf8698c72ce 100755 (executable)
--- a/lyrics/02-lyricwiki.rb
+++ b/lyrics/02-lyricwiki.rb
require 'uri'
require 'net/http'
+require 'cgi'
url = "http://lyrics.wikia.com/api.php?action=lyrics&fmt=xml&func=getSong" + \
"&artist=#{URI.escape(ARGV[0])}&song=#{URI.escape(ARGV[1])}"
exit(1)
end
-puts $1.gsub(/<br \/>/, "\n")
+puts CGI::unescapeHTML($1.gsub(/<br \/>/, "\n"))