Skip to main content

Topic: LyricWiki Script for Lyricsgrabber2 (Read 3594 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • phot0nic
  • [*]
LyricWiki Script for Lyricsgrabber2
Here is the Python script I made for LyricWiki that works with the Lyricsgrabber2 component.  For some reason this forum won't let me attach .py files, so rename the attached .txt file to .py before placing it in the pygrabber/scripts directory.

LyricWiki Script for Lyricsgrabber2
Reply #1
dont work for me

LyricWiki Script for Lyricsgrabber2
Reply #2
Here is the Python script I made for LyricWiki that works with the Lyricsgrabber2 component.  For some reason this forum won't let me attach .py files, so rename the attached .txt file to .py before placing it in the pygrabber/scripts directory.



omg work now!! i dont know how but work.. thanks love you

LyricWiki Script for Lyricsgrabber2
Reply #3
Here is the Python script I made for LyricWiki that works with the Lyricsgrabber2 component.  For some reason this forum won't let me attach .py files, so rename the attached .txt file to .py before placing it in the pygrabber/scripts directory.


well.. i got theses thing before all lyrics,, can help me please?

  • phot0nic
  • [*]
LyricWiki Script for Lyricsgrabber2
Reply #4
Sorry, I really should have posted better instructions.

First, a background:

The Lyricsgrabber2 component has a variety of built-in lyrics providers (Dark Lyrics, Leo's Lyrics, LyrDB, LyricWiki, and AZ Lyrics), and it obtains the lyrics by requesting them from the selected server and scraping the relevant data from the returned page.  Unfortunately, when a website changes their layout, the scraping code will return the wrong information, or just flat-out stop working.  LyricsWiki changed their website layout a while ago, and due to the fact that the Lyricsgrabber2 component is no longer in development (to the best of my knowledge), the built-in LyricWiki command doesn't work right.  When you attempt to use it, it will return a response similar to what luucasalves posted above.

A good part of the Lyricsgrabber2 component is that it supports external Python scripts so that users can add their own lyrics providers without requesting them from the component developer.  So, what I've done is create a Python script for LyricWiki that takes into account their website changes, and will work in place of the built-in LyricWiki command.

luucasalve:

The response you posted is not from my script; it's from the built-in LyricWiki scraper.  To use my script:

1) Download the attachment and rename it to LyricWiki.py
2) Place the file in the pygrabber\scripts folder.  I believe the default directory is:
Code: [Select]
%AppData%\foobar2000\user-components\foo_lyricsgrabber2\pygrabber\scripts\

3) In foobar2000, go to the Preferences and click Tools > Lyrics Grabber 2
4) Select Scripts from the Provider dropdown and click Options... > Settings
5) Click Refresh, and the LyricWiki script should appear.  If it does not, you've placed the script in the wrong directory
6) Right-click on the song for which you want to download lyrics, and select the Lyrics Grabber > Scripts > LyricWiki option.  NOTE: The "Search All" command only searches the built-in providers, and does not include the scripts.

Hopefully this works.  Let me know if you have any problems.

LyricWiki Script for Lyricsgrabber2
Reply #5
Here is the Python script I made for LyricWiki that works with the Lyricsgrabber2 component.  For some reason this forum won't let me attach .py files, so rename the attached .txt file to .py before placing it in the pygrabber/scripts directory.


well.. i got theses thing before all lyrics,, can help me please?


thank you so much!! work fine now, i got one question... any people can edit and create a own script with differente source? like rapgenius.com etc

  • onanboy
  • [*]
LyricWiki Script for Lyricsgrabber2
Reply #6
Sorry, I really should have posted better instructions.

First, a background:

The Lyricsgrabber2 component has a variety of built-in lyrics providers (Dark Lyrics, Leo's Lyrics, LyrDB, LyricWiki, and AZ Lyrics), and it obtains the lyrics by requesting them from the selected server and scraping the relevant data from the returned page.  Unfortunately, when a website changes their layout, the scraping code will return the wrong information, or just flat-out stop working.  LyricsWiki changed their website layout a while ago, and due to the fact that the Lyricsgrabber2 component is no longer in development (to the best of my knowledge), the built-in LyricWiki command doesn't work right.  When you attempt to use it, it will return a response similar to what luucasalves posted above.

A good part of the Lyricsgrabber2 component is that it supports external Python scripts so that users can add their own lyrics providers without requesting them from the component developer.  So, what I've done is create a Python script for LyricWiki that takes into account their website changes, and will work in place of the built-in LyricWiki command.

luucasalve:

The response you posted is not from my script; it's from the built-in LyricWiki scraper.  To use my script:

1) Download the attachment and rename it to LyricWiki.py
2) Place the file in the pygrabber\scripts folder.  I believe the default directory is:
Code: [Select]
%AppData%\foobar2000\user-components\foo_lyricsgrabber2\pygrabber\scripts\

3) In foobar2000, go to the Preferences and click Tools > Lyrics Grabber 2
4) Select Scripts from the Provider dropdown and click Options... > Settings
5) Click Refresh, and the LyricWiki script should appear.  If it does not, you've placed the script in the wrong directory
6) Right-click on the song for which you want to download lyrics, and select the Lyrics Grabber > Scripts > LyricWiki option.  NOTE: The "Search All" command only searches the built-in providers, and does not include the scripts.

Hopefully this works.  Let me know if you have any problems.



The script is still working great but I need some guidance.  Whenever there is something in parentheses in the %title% then the script will not find anything.  For instance, God Only Knows works fine but God Only Knows (stereo) will not work.  Is there a way to put something like -

Code: [Select]
$puts(char,'(')$puts(tag,%title%)$puts(spacer,$strchr($get(tag),$get(char)))
$trim($left($get(tag),$sub($get(spacer),1)))


I tried an amateurish swipe at it but got nowhere.  Any suggestions?  Also on a side note, the script will not return anything that has lyrics that are "[Instrumental]" but the normal Lyric search using the LyricWiki will do it without the stupid

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)};}})();