Skip to main content

Topic: Lyricsgrabber2 Feedback & Discussion (Read 118803 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • JJForums
  • [*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #225
I don't know how to use it, I installed it, how do I put it in my layout?

  • Erich_2
  • [*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #226
I don't know how to use it, I installed it, how do I put it in my layout?

See Post #1:

Instructions:
Right-Click a song and choose in the menu "Lyrics Grabber" the provider to download the lyrics from.

Layout (DUI) with foo_textdisplay (=static, no scrolling) and %lyrics% 
  • Last Edit: 04 August, 2011, 04:21:52 PM by Erich_2

  • JJForums
  • [*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #227
I see now, but it do not download synced lyrics...

  • fobside
  • [*]
Lyricsgrabber2 Feedback & Discussion
Reply #228
Every query I've attempted has given me the "failed" status.  Any ideas on what I may have done wrong?

  • lokioki
  • [*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #229
Is there any alternative plug-in for fetching lyrics ? just need a similar plugin, simple one, which just fetches the lyrics and saves them to id3-tags, but this keeps crashing foobar all the time.
  • Last Edit: 18 August, 2011, 08:33:51 AM by lokioki

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
Lyricsgrabber2 Feedback & Discussion
Reply #230
You might find useful this recent thread on the same question: Reliable/stable lyrics plugin, and there may be others discoverable via a search.

  • Vittorio
  • [*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #231
Hi, I always get a "Failed" message on the Dark Lyrics search, but when checking the website manually all the lyrics I've searched for are there.
I also tried an older version of the Dark Lyrics Script from this site: lyricsgrabber google code page but on some (/most) tracks I also get the "Failed" message.

Is there any newer version of this script or will there be some bugfixes in Lyricsgrabber 2 ?

Besides, many lyrics can not be found because of some reasons, e.g.:
- track is listed under different name on the site
- ID3 has typos

I think this should be considered in future releases
  • Last Edit: 18 August, 2011, 05:42:08 PM by Vittorio

Lyricsgrabber2 Feedback & Discussion
Reply #232
Is there any newer version of this script or will there be some bugfixes in Lyricsgrabber 2 ?
As Qudeid started with his work on this mod of lyricsgrabber he also had announced that he won't have time when his first job starts. So the answer is "no" as long as nobody picks up the available source. I like this component and its easy-to-use concept so it would be a shame if that component dies.

german support forum: www.foobar-users.de / user: qwert73

  • Qudeid
  • [*][*][*]
  • Developer
Lyricsgrabber2 Feedback & Discussion
Reply #233
Thanks Stankovic for clarifying that in my name,

and my sincere apologies for all who like this plugin. I still use it myself and am also annoyed if something isn't working right.

The problem is, besides the time issue, that I can't get the sources to compile, as I didn't make any notes on what dependencies I need or how they are to be compiled. And trust me, this is also really annoying for me.
As I am mainly a C# developer and until I find the time to look into foobar plugin development again, if ever possible, I am currently considering a standalone application, where you can drag/drop your music (even folders) and search for lyrics like this. This is a lot easier for me to develop and a whole lot less time consuming so I am able to do this in my free time. (I'm currently looking into the specifications of Tags, like ID3/FLAC/APE so I can add Lyrics to them.)
I'm also considering some kind of API to give the ability to develop "plug-ins" (rather additions) to the application so that other lyrics websites can be easily scanned for lyrics.

But, as already mentioned, it is a project I do on my own free time so no promises made as I am currently a full employee. Also I am aware that this isn't as easy to use like the context menu in foobar.. BUT, maybe I add a command line usage possibility so that someone who has more experience in C++ and Foobar Plugin development can just send the files over to my application.

Yet again, I am really sorry I couldn't fix those bugs and wasn't able to respond for most of the passed time.

Greetings,

Qudeid

PS: if someone should consider fixing those bugs etc. Please contact me here or via PN. I will gladly add you to the google code project!

  • dag0
  • [*]
Lyricsgrabber2 Feedback & Discussion
Reply #234
the usage is simple, when putting a button to the button-bar as I did. Mark tracks or album(s), klick button. If you want use "silent mode".

I first installed "lyrics grabber" plus "lyrics grabber2" it kept crashing. I removed both installed only "lyrics grabber2" just today and it seems to work (knock on wood...)

  • mire777
  • [*][*][*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #235
works well for me, but is it possible to get synced lyrics?

  • WilB
  • [*][*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #236
No, not with lyricsgrabber2  - you would need to use foo_uie_lyrics3. If you particularly wanted the batch facility lyricsgrabber2 offered then I afraid that's not currently available as such in foo_uie_lyrics3 but there are workarounds with foo_uie_lyrics3. See:
http://www.hydrogenaudio.org/forums/index....st&p=783626
  • Last Edit: 21 March, 2013, 07:51:58 PM by WilB

  • romor
  • [*][*][*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #237
For reference, timestamped lyrics in lyrics3 plugin are:

Timestamped1 = Cicyzone
Timestamped2 = TTPlayer
Timestamped3 = MiniLyrics

Resource 1 doesn't seem to work here, while resource 2 is available in Lyrics grabber as last entry in 'scripts' context menu.

Now resource 3, or MiniLyrics, with no comments by vern, uses exotic feature of HTTP 1.1 server that's not implemented in Python HTTP library and is not doable w/o additional module.

  • mire777
  • [*][*][*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #238
No, not with lyricsgrabber2  - you would need to use foo_uie_lyrics3. If you particularly wanted the batch facility lyricsgrabber2 offered then I afraid that's not currently available as such in foo_uie_lyrics3 but there are workarounds with foo_uie_lyrics3. See:
http://www.hydrogenaudio.org/forums/index....st&p=783626


Thank's script works great.That's what I wanted...
Only one problem, you have to wait some seconds if you don't find lyrics, (10 sec to me).
It would be good if there is a possibility to write something like this :

if( fb.TitleFormat(''%search_progress%).Eval() ''then wait until End''.

Else

if( fb.TitleFormat( "%lyric_exists%" ).Eval() )
          fb.Next();

I don't know how to write this...
  • Last Edit: 22 March, 2013, 10:58:54 AM by mire777

  • WilB
  • [*][*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #239
I had a quick look. As far as I can tell, %search_progress% and %search_state% are not globally provided by lyrics3 and are only available within lyrics3, so unfortunately I do not believe you can do what you suggest - but it was a nice idea.

  • mire777
  • [*][*][*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #240
Thanks i did all the songs now, i had some 7000 without lyrics. and this also work ok...

  • onanboy
  • [*]
Lyricsgrabber2 Feedback & Discussion
Reply #241
I realize that this is an old thread and a somewhat dead component but I want to ask anyway.

About a year ago maybe (?) I started to get the following added to all lyrics that I downloaded from LyricWiki using Lyricgrabber2:

Code: [Select]
');var c=function(){cf.showAsyncAd(opts)};if(window.cf)c();else{cf_async=!0;var r=document.createElement("script"),s=document.getElementsByTagName("script")[0];r.async=!0;r.src="//srv.tonefuse.com/showads/showad.js";r.readyState?r.onreadystatechange=function(){if("loaded"==r.readyState||"complete"==r.readyState)r.onreadystatechange=null,c()}:r.onload=c;s.parentNode.insertBefore(r,s)};}})();

I would guess that something about the LyricWiki site changed enough to make some puncuation of the LyricWiki script that the grabber used to be wrong.  Since then, whenever I download lyrics from there I have to manually remove the above manually.  I know, tough cookies. 

I tried to figure out where the script was to see if I could modify it myself. I failed.

Anyone run into this?

  • klonuo
  • [*][*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #242
It seems like pity that no one cares to link this plugin against Python 2.7 (VS2008) as there won't be any 2.8.x or even better today to 3.4 (VS2010) because it's not just the lyrics, but anyone can automate filling of arbitrary tags. Although it still seems to work fine here as it is.

@onanboy, I can't help you, but your provider is built-in in component itself (I assume using it's API that is now changed). But you can make yourself lyricswiki scrapper with basic Python knowledge.
  • Last Edit: 10 April, 2015, 05:34:05 PM by klonuo

  • loft
  • [*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #243
@onanboy, did you manage to solve this problem?
I am currently trying to look over the code and see if I can fix it. I am no Python expert (can't even call myself a programmer) but I'll give it a try.

PS: Din you manage somehow to sort the affected files. Because of the abundance of special characters in extra bad string, I didn't manage to evidentiate in the playlist the affected files.

  • phot0nic
  • [*]
Lyricsgrabber2 Feedback & Discussion
Reply #244
I realize that this is an old thread and a somewhat dead component but I want to ask anyway.

About a year ago maybe (?) I started to get the following added to all lyrics that I downloaded from LyricWiki using Lyricgrabber2:

[...]

I would guess that something about the LyricWiki site changed enough to make some puncuation of the LyricWiki script that the grabber used to be wrong.  Since then, whenever I download lyrics from there I have to manually remove the above manually.  I know, tough cookies. 

I tried to figure out where the script was to see if I could modify it myself. I failed.

Anyone run into this?

Yeah, LyricWiki changed something on their site a while ago, and the built-in scraper doesn't work anymore.  The great thing about this component is that it's compatible with external "scripts" so that it's easy to make/edit your own when sites change their code.  Here's a replacement LyricWiki script that works for me:

Code: [Select]
# -*- coding: utf-8 -*-
  import encodings.utf_8
  import urllib
  from xml.dom import minidom
  from LevenshteinDistance import LevenshteinDistance
  from unescape import unescape
  from grabber import LyricProviderBase
 
  class LyricWiki(LyricProviderBase):
     def GetName(self):
         return "LyricWiki"
    
     def GetVersion(self):
         return "1.0"
    
     def GetURL(self):
         return "[url=http://lyrics.wikia.com/]http://lyrics.wikia.com/[/url]"
    
     def Query(self, handles, status, abort):
         result = []
        
         for handle in handles:
             status.Advance()
            
             if abort.Aborting():
                 return result
            
             artist = handle.Format("[%artist%]")
             song = handle.Format("[%title%]")
            
             try:
                 string = urllib.urlopen("[url=http://lyrics.wikia.com/api.php?artist=%s&song=%s&fmt=xml]http://lyrics.wikia.com/api.php?artist=%s&...=%s&fmt=xml[/url]" % (urllib.quote(artist), urllib.quote(song))).read()
                 doc = minidom.parseString(string)
                 child = doc.getElementsByTagName("LyricsResult")[0]
                 url = child.getElementsByTagName("url")[0]
                 url = url.childNodes[0].data.encode('utf_8')               
                 found_artist = child.getElementsByTagName("artist")[0]
                 found_song = child.getElementsByTagName("song")[0]
                 found_artist = found_artist.childNodes[0].data.encode('utf_8')
                 found_song = found_song.childNodes[0].data.encode('utf_8')
                 artist = artist.lower()
                 song = song.lower()
                 found_artist = found_artist.lower()
                 found_song = found_song.lower()
                
                 if (LevenshteinDistance(artist, found_artist) < 5) and (LevenshteinDistance(song, found_song) < 7):
                     string2 = urllib.urlopen(url).read()
                     start = string2.find("<div class=\'lyricbox") + 22
                     start = string2.find("</script>",start) + 9
                     end = string2.find("<!--", start)
                     lyric = string2[start:end].replace("
  ","\r\n").replace("<i>","").replace("</i>","")
                     lyric = unescape(lyric).encode('utf8')
                     if (lyric.find("<script>") == -1 and lyric.find("</noscript>") == -1 and lyric.find("Unfortunately, we are not licensed to display the full lyrics for this song at the moment") == -1):
                         result.append(lyric)
                     else: result.append('')
                 else: result.append('')
                    
 
             except:
                 traceback.print_exc(file=sys.stdout)
                 result.append('')
                 continue
        
         return result
 
  if __name__ == "__main__":
     LyricProviderInstance = LyricWiki()
 

You should just be able to save those contents into a *.py file and place it in your pygrabber\scripts directory.  You'll now have to access LyricWiki using the "scripts" submenu.

---

While typing up this response, I just noticed that copying and pasting from a codebox on this forum doesn't seem to retain the indentations, which will break the script.  I've uploaded the script code here:
http://codeviewer.org/view/code:5143
Just use the dropdown in the upper-right to download the code with indentations intact.  Again, rename it to *.py and place it in the appropriate directory.

  • onanboy
  • [*]
Lyricsgrabber2 Feedback & Discussion
Reply #245
@onanboy, did you manage to solve this problem?
I am currently trying to look over the code and see if I can fix it. I am no Python expert (can't even call myself a programmer) but I'll give it a try.

PS: Din you manage somehow to sort the affected files. Because of the abundance of special characters in extra bad string, I didn't manage to evidentiate in the playlist the affected files.


No I haven't solved this yet. I want to try phot0nics script but when I copied the LyricWiki.py script to the proper folder it will not show up as one of the available scripts.  I restarted the program but did not reboot my computer yet. Maybe that will be next.

The affected files =  all files.

  • onanboy
  • [*]
Lyricsgrabber2 Feedback & Discussion
Reply #246
Got the file in the correct Scripts folder this time but when I go to refresh my list of scripts for LyricGrabber2 I get the following:

Code: [Select]
foo_grabber_python: Traceback (most recent call last):
  File "C:\Users\Gonzo\AppData\Roaming\foobar2000\user-components\foo_lyricsgrabber2\pygrabber\scripts\LyricWiki.py", line 6, in <module>
   from unescape import unescape
ImportError: No module named unescape


What should I do next?

  • onanboy
  • [*]
Lyricsgrabber2 Feedback & Discussion
Reply #247
Got the file in the correct Scripts folder this time but when I go to refresh my list of scripts for LyricGrabber2 I get the following:

Code: [Select]
foo_grabber_python: Traceback (most recent call last):
  File "C:\Users\Gonzo\AppData\Roaming\foobar2000\user-components\foo_lyricsgrabber2\pygrabber\scripts\LyricWiki.py", line 6, in <module>
   from unescape import unescape
ImportError: No module named unescape


What should I do next?

It would load but not work it I removed the line about importing unescape.

  • phot0nic
  • [*]
Lyricsgrabber2 Feedback & Discussion
Reply #248
It would load but not work it I removed the line about importing unescape.

Sorry about that.  I thought the unescape function came with the component.  Here's the code for that function:
http://codeviewer.org/view/code:5289

Save the code as unescape.py, and store it in your "C:\Users\Gonzo\AppData\Roaming\foobar2000\user-components\foo_lyricsgrabber2\pygrabber\system\" directory.

For future reference (in case the codeviewer link breaks), here's the unescape function:
Code: [Select]
import re, htmlentitydefs

##
# Removes HTML or XML character references and entities from a text string.
#
# @param text The HTML (or XML) source text.
# @return The plain text, as a Unicode string, if necessary.

def unescape(text):
   def fixup(m):
       text = m.group(0)
       if text[:2] == "&#":
           # character reference
           try:
               if text[:3] == "&#x":
                   return unichr(int(text[3:-1], 16))
               else:
                   return unichr(int(text[2:-1]))
           except ValueError:
               pass
       else:
           # named entity
           try:
               text = unichr(htmlentitydefs.name2codepoint[text[1:-1]])
           except KeyError:
               pass
       return text # leave as is
   return re.sub("&#?\w+;", fixup, text)



  • klonuo
  • [*][*][*][*]
Lyricsgrabber2 Feedback & Discussion
Reply #249
There is no need for special function...

You can unescape html/xml entities with standard library:

Code: [Select]
import HTMLParser
escape = '&copy; %s666;' % '&#'  # complicated escape sting example because of the stupid code parser on this forum
print HTMLParser.HTMLParser().unescape(escape)
  • Last Edit: 22 June, 2015, 03:18:58 AM by klonuo