Unfortunately, I can't help when it comes to compiling code for foobar2000, however, I would like to see a proper update to the component. Having the commands stuck in the "Legacy Commands" submenu is annoying.But how did you set the referer? I'm curious so that I can at least update my python script in the meantime.
# -*- coding: utf-8 -*-import encodings.utf_8import urllibimport urllib2from xml.dom import minidomfrom grabber import LyricProviderBaseclass LyricsPlugin(LyricProviderBase): def GetName(self): return "Lyrics Plugin" def GetVersion(self): return "1" def GetURL(self): return "http://www.lyricsplugin.com" def GetAuthor(self): return "Hitchhiker427 + Qudeid" def Query(self, handles, status, abort): result =  for handle in handles: status.Advance() if abort.Aborting(): return result artist = handle.Format("[%artist%]") title = handle.Format("[%title%]") try: req = urllib2.Request("http://www.lyricsplugin.com/winamp03/plugin/content.php?artist=%s&title=%s" % (urllib.quote(artist), urllib.quote(title))) req.add_header('Referer', "http://www.lyricsplugin.com/winamp03/plugin/?artist=%s&title=%s" % (urllib.quote(artist), urllib.quote(title))) string = urllib2.urlopen(req).read() start = string.find("<div id=\"lyrics\">") + 18 end = string.find("</div>", start) lyric = string[start:end].replace("<br />","") result.append(lyric) except Exception, e: traceback.print_exc(file=sys.stdout) result.append('') continue return resultif __name__ == "__main__": LyricProviderInstance = LyricsPlugin()
Guys.. I've made it! *happy*
Quote from: Qudeid on 06 August, 2010, 12:18:08 PMGuys.. I've made it! *happy*Wow, awesome! Thank you for doing this.There's one little problem that I noticed. The Lyrics Plugin command works, however, it still writes the "tunerankings.com" URL to the bottom of the lyrics. This is particularly annoying when trying to download lyrics that don't exist, but Lyrics Grabber still reports success. Thank you again.
Works for me too.Thanks for this update
@QudeidAh, if you're Mortanse i just linked to your own update... Btw. is it possible to integrate some other lyrics sources too?LyricsWiki doesn't works since a long time and should be removed instead.With more integrated sources there wouldn't be the need to write scripts in python by the end-user.
On the one hand, it's a pretty hacked way to get the lyrics. On the other hand, the new server supposedly searches Leo's Lyrics, Lyrics Mode, Lyrics Wiki, MetroLyrics, AbsoluteLyrics, SongLyrics, LyricsTime, and possibly DarkLyrics. Perhaps someone could get in touch with the poster in the linked thread who maintains the server so that we don't need to modify the hosts file.