summaryrefslogtreecommitdiff
path: root/extra/sonata/info.py.patch
blob: e95cc3a081fcb368901832cd7764f6d7d3e249a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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("<lyrics>")[1].split("</lyrics>")[0].strip()
+				if lyrics.strip() != "<!-- PUT LYRICS HERE (and delete this entire line) -->":
 					lyrics = misc.wiki_to_html(lyrics)
 					lyrics = lyrics.decode("utf-8")
 # Save lyrics to file: