From bf35116f9d203dcafce808a6c7b3dd5a0db8afbc Mon Sep 17 00:00:00 2001 From: root Date: Tue, 2 Aug 2011 04:35:55 +0000 Subject: Tue Aug 2 04:35:55 UTC 2011 --- extra/sonata/info.py.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 extra/sonata/info.py.patch (limited to 'extra/sonata/info.py.patch') diff --git a/extra/sonata/info.py.patch b/extra/sonata/info.py.patch new file mode 100644 index 000000000..e95cc3a08 --- /dev/null +++ b/extra/sonata/info.py.patch @@ -0,0 +1,15 @@ +--- sonata/info.py 2011-07-05 22:32:08.452556016 -0500 ++++ sonata/info.py 2011-07-05 22:45:50.849311466 -0500 +@@ -393,9 +393,9 @@ + if content.startswith("#REDIRECT [["): + addr = "http://lyricwiki.org/index.php?title=%s&action=edit" % urllib.quote(content.split("[[")[1].split("]]")[0]) + content = urllib.urlopen(addr).read() +- lyrics = content.split("<lyrics>")[1].split("</lyrics>")[0] +- if lyrics.strip() != "<!-- PUT LYRICS HERE (and delete this entire line) -->": +- lyrics = misc.unescape_html(lyrics) ++ content = misc.unescape_html(content) ++ lyrics = content.split("")[1].split("")[0].strip() ++ if lyrics.strip() != "": + lyrics = misc.wiki_to_html(lyrics) + lyrics = lyrics.decode("utf-8") + # Save lyrics to file: -- cgit v1.2.3-54-g00ecf