
Googlyrics2
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
I wrote Googlyrics when I was getting sick of the low yield on existing lyrics scripts. A long time ago, I discovered a windows application (EvilLyrics) that had an interesting idea: search a search engine for lyrics, then filter them out of the page. Well, after examining pages from several lyric sites I determined they could be extracted quite easily and quite the original Googlyrics, however, I was never happy with the way Googlyrics was programmed, it wasn't modular and would only work with Amarok. Googlyrics2 is a completely modular rewrite in pure python, it's now simple to add in new lyric sites and modify it for other media players. Googlyrics2 is only the Amarok script with plugins for all the lyrics sites from the original googlyrics (and yes, they all work now and will be much easier to update due to built in mass testing features), a seprate application will later be released which will allow Googlyrics2 to work with any media player. Googlyrics2 currently supports 26 different lyrics sites and can be easily added to. Big thanks to the many people who have contributed code for the original Googlyrics and to everyone who sends me nice comments, I love to know I'm appreciated :D. Googlyrics2 now requires nothing more than a default python 2.5 installation, no more complaints on random forums about WWW::Mechanize.
PLEASE COMMENT IF YOU VOTE BAD! Also, this script is in beta so all comments are appreciated.
A new experimental pre-beta5 is out, unfortunately I don't have a copy of amarok 1.x at my disposal at the moment but I figured the community really needed this update. I hope it works. If this works it should fix the most complained about bugs (specifically encoding bugs). Major thanks goes out to grindi who has contributed much code for this release. I cannot thank you enough, I did nothing but struggle with character set issues.
11 years ago
See homepage.
11 years ago
See homepage.
jnr
11 years ago
Report
bugmenot1234
11 years ago
Report
outlikeashoe
11 years ago
If the extracted lyrics could be valid returns it, otherwise skip to the next google link.
You can find the code at http://www.sanfanling.cn/svn/lrcShow-X/branches/outlikeashoe/lrcShow-X/engines/plain_lyrics.py .
Hope this helps.
Report
souplin
12 years ago
/usr/lib/python2.6/urllib.py:1216: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal res = map(safe_map.__getitem__, s) Traceback (most recent call last): File "/home/souplin/.kde/share/apps/amarok/scripts/Googlyrics2/Googlyrics2.py", line 50, in <module> a.run() File "/home/fidol/.kde/share/apps/amarok/scripts/Googlyrics2/Googlyrics2.py", line 45, in run doctxt = doc.toxml() File "/usr/lib/python2.6/xml/dom/minidom.py", line 45, in toxml return self.toprettyxml("", "", encoding) File "/usr/lib/python2.6/xml/dom/minidom.py", line 60, in toprettyxml return writer.getvalue() File "/usr/lib/python2.6/StringIO.py", line 270, in getvalue self.buf += ''.join(self.buflist) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Report
grindi
12 years ago
Report
LarsF
12 years ago
Artist:
Erste Allgemeine Verunsicherung
Title:
BaBaBanküberfall
or
Artist:
Erste Allgemeine Verunsicherung
Title:
Sandlerkönig Eberhard
Report
grindi
12 years ago
First you need install mercurial (something like "sudo apt-get install mercurial" on debian-based systems) and then type in console:
cd ~/.kde/share/apps/amarok/scripts
mv Googlyrics2{,_old}
hg clone http://hg.limeskull.org/Googlyrics2/
After these operations restart amarok.
Report
LarsF
12 years ago
Thank you very much!
Report
Woshee
12 years ago
Using Opensuse 11.0, with amarok 1.4.10.
Two things:
- When I install googlyrics2 beta4 from the built in browser of amarok, there are plenty of *.py that are displayed in the "General" section of the installed scripts. When I uninstall googlyrics, they seem to vanish with it.
- I had a problem with unusual characters, but it seems you have already a work around.
Good job for this app.
Report
Woshee
12 years ago
Report
mattepiu
12 years ago
these are my scripts:
1) lyricserver.py
http://pastebin.com/f63d55d4c
usage: put in googlyrics folder and run python lyricserver.py [port] , default port is 8801.
to test: in a browser insert url: http://localhost:8801/html+_+artist+_+title
2) main.js
http://pastebin.com/f5d20b9af
script to give to amarok 2 the ability to get lyrics from lyricserver (which must be loaded!!!!)
Report
ultramancool
12 years ago
Report
mattepiu
11 years ago
Report
shizzledizzle
12 years ago
doc.documentElement.appendChild(doc.createTextNode(saxutils.escape(outlyric.lyrics))
to
doc.documentElement.appendChild(doc.createTextNode(saxutils.escape(outlyric.lyrics).encode('UTF-8')))
seems to have fixed the special character issue for me
Report
tosszyx
12 years ago
Thanks
Report
ultramancool
12 years ago
Report
etechnophile
12 years ago
Now (approx 2 hours later) if Googlyrics2 beta 3 can't find the lyrics of a song, it displays the last successfully found lyrics. This may be the same bug as reported by StMPA3b on Oct 8 2008.
Report
etechnophile
12 years ago
Traceback (most recent call last):
File "/home/username/.kde/share/apps/amarok/scripts/Googlyrics2/Googlyrics2.py", line 47, in <module>
a.run()
File "/home/username/.kde/share/apps/amarok/scripts/Googlyrics2/Googlyrics2.py", line 30, in run
if outlyric is None:
UnboundLocalError: local variable 'outlyric' referenced before assignment
Report
V17
12 years ago
I try to test LyricsMania: i have remove all sites from config.ini and i have test only LyricsMania.... it doesn't work.
Report
V17
12 years ago
In file
~/.kde/share/apps/amarok/scripts/Googlyrics2/sites/LyricsMania.py
at line 8
replace: </strong> :</br>
with: </strong> :<br />
Now LyricsMania work fine
Enjoy
Report
RgnKjnVA
12 years ago
However, I also experienced the non-english results issue, the first two songs as a matter of fact, so here's my I'm-not-a-developer-but-this-simple-solution-seems-like-it-would-be-so-easy two cents worth...
I presume the problem (from an english-speaking perspective) is that the plug-in just displays the lyrics of the first search result which is sometimes not an English site. If so, how about a Re-search function that wouldn't return previously presented results? That presumes you track or can easily track either the domains that source the lyric searches or the number of the search result used to retrieve lyrics. That might be a pain to develop but that's all I've got. heh heh There's no guarantee the next result would be in English either but at least users wouldn't be stuck with lyrics they can't read without some form of recourse.
Overall, I'm just happy to have a lyrics plug-in that returns results at all and is in English more often than not! Thanks again
Report
RgnKjnVA
12 years ago
127.0.0.1 www.lyricstime.com
It solved the problem for me.
Report
konne88
12 years ago
Report
arkoldthos
12 years ago
Report
mattepiu
12 years ago
amarok devs decided to not expose lyrics/cover mechanism to dbus and to allow
scripting only in QtScript language (wich sadly means just javascript), don't ask
me why as I was shocked when I discovered this, and still asking myself.
My solution was to transform Googlyrics into a little webserver (running in
background and accepting connections only from localhost) and to use a really dumb
javascript just to retrieve lyrics from this simple webserver. Issue is now how to cache data,
as I'm unsure if it's legally allowed to have them exposed
into a computer folder.
Once I'll have sorted all the issues I'll ask to ultramancool to "upgrade" Googlyrics
with my solution (one lyricserver script and one javascript)
Report