From 757c3855f0cbd9fb30dea733433d7701830488f4 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 5 May 2009 20:30:29 +0200 Subject: Lyrics: make utf-8 requests work with LyricWiki. --- nephilim/plugins/Lyrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nephilim/plugins/Lyrics.py') diff --git a/nephilim/plugins/Lyrics.py b/nephilim/plugins/Lyrics.py index 29795f2..4a551e9 100644 --- a/nephilim/plugins/Lyrics.py +++ b/nephilim/plugins/Lyrics.py @@ -107,8 +107,8 @@ class Lyrics(Plugin): def fetch_lyricwiki(self, song): soap = LyricWiki_client.LyricWikiBindingSOAP("http://lyricwiki.org/server.php") req = LyricWiki_client.getSongRequest() - req.Artist = song.artist() - req.Song = song.title() + req.Artist = song.artist().encode('utf-8').decode('iso8859').encode('utf-8') + req.Song = song.title().encode('utf-8').decode('iso8859').encode('utf-8') try: result = soap.getSong(req).Return.Lyrics.decode('utf-8').encode('iso8859').decode('utf-8') except socket.error, e: -- cgit v1.2.3