YouTube Lyrics

By Aquilax Last update Jul 27, 2009 — Installed 136,682 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 97 posts, 31 voices



Guybrush Scriptwright

one of the most useful scripts... : )
but not working for some youtube links.

for example:
http://www.youtube.com/watch?v=HSBZvEeB0-o
(Althugh there is no lyric in the video : ) )

(No related errors from error console)

 
naoki User

please please add an all in one lyrics searcher so it shows all results from all the lyric sites.and also i see no point for the scroll bar on the right and bottom side.atleast add an option to remove it. thankyou

 
dkhal Scriptwright

thanks for a very cool script i see that you have advertised for it all over the internet !
nice work
you inspired me so i'm gonna try to make a lyrics plugin for my youtube enhancer

 
Aquilax Script's Author

@Excalibur

All the resources are stored in xml files. The xml file without underscores is the base resources file, the other are the localized resources files. Not everything in the base resources file must be translated, but only the texts.
At best choose an already translate resource (de/es/fr/it) and overwrite it, you can always look at the original english text in the base resource file. Each resource is identified with an unique id, which doesn't change with the localization of the resource.
First you have to find the xml resource files on your computer, that is more easy to say that to do because you have to access to an hidden path. At best choose from the GM menu the "Manage User Scripts..." option and than edit the "Youtube Lyrics" script. When you are in the editor choose the "Save as ..." option from the file menu, now you should be able to copy the path from the saving dialog, the resources files are located in the same path of the script.
Now just start your preferred editor and chose to open an existing file, in the open file dialog paste the before copied path and you should see 10 xml files and 2 script files. The xml files are the resources files.

 
Excaliber User

I'm not sure how but it's working now, thank you very much Aquilax!
I would like to help the project and translate the script into Hebrew, is there anything special i need to know?

Thanks again!

 
Aquilax Script's Author

@Excaliber

Version 3.0 uses some xml files as resources, this is sadly but they can't be hosted by US.org, so I hosted them to fileden.com. Sometimes it needs a few seconds (5-6 seconds) to fetch these files. When I was testing the install process I had the same problem a couple of times, I not sure of it but don't switch window tab during the installation, wait until in the status bar appear the message that the script has been successful installed.
Hope this help.

In any case you can always install the old version again, you find it under the versions link:
http://userscripts.org/scripts/versions/22569

 
Excaliber User

I can't upgrade to the new 3.0 version.
i install it and it doesnt say anything like "the script installed" or anything.
i have the latest greamonkey and i removed the old you tube lyrics plugin(version:2.10)

Firefox version:3.0.1
Greasmonkey version: 0.8.20080609.0

hope you will figure that out soon,
Tnx!

 
Aquilax Script's Author

I'm not a flash coder, it is better that you ask Tim McCormak, he can surely give you an answer about it.

 
Guybrush Scriptwright

example for a online radio station with flash player;

http://www.radyoodtu.com.tr/iplayer/index.asp

the second line shows the name of the artist and the song. although it is a flash player,
you can copy the song name and paste it anywhere.
Can this info be taken by script?
if so, it will really very easy to modify the whole script for this lovely radio station : ))

 
Aquilax Script's Author

@dkhal
Sorry dkhal, but the problem is not get the flash object or read the parameters of the embed tag, but read the internal variables of the flash program.

 
dkhal Scriptwright

no you're way not updated check this code snipet

//lets say this is the flash on the web the simplest and the main thing of the flash
<embed src="something.swf">
</embed>

// this is one of i dnt know how many methods to get its name
var i, name;
var all=new Array();
all=document.getElementsByTagName("embed"); // gets all embed objects on the page
for(i=0; i<all>
if(all[i].src="something.swf"){
name=all[i].name;
}
}

piece of cake :P and this is the method where u know the source
if you do not know the source you can check for other know parameters of the flash object

 
Aquilax Script's Author

I didn't know about this hack, I have never programmed something in flash (and I think I will never do it). Oh yeah, I see it, decompile the flash application, read the code and hopping that the author and title are assigned to a global variable. Most probably these are hacking tricks to debug flash programs, and surely they can't access to internal/local variables.
Flash Object Actions

 
JoeSimmons Scriptwright

Grab the name from a flash application is impossible

Actually you're wrong. Read the comments on this

 
Aquilax Script's Author

@Guybrush, theoretically yes, but this script uses also part of youtube's css and javascript. Grab the name from a flash application is impossible, because the flash is also only a client and it receive the author and title from the server (the radio station).

 
Guybrush Scriptwright

Is it possible to adopt this script to the other sites?. For example online radios... If the singer and the song name is written on the site, still the script can search lyrics for it.
(What if the singer and song name is displaced in flash player in the online radio site? Any possibility to get the song name from swf, played in any site?)

 
naoki User

Try my script, it includes yousabletubefix,youtube lyrics and YouTube "Lights Out" - http://userscripts.org/scripts/show/32383

 
naoki User

Make it search all ten search engines at once for a better search!

 
r6 Scriptwright

I had to add "clear: both;" to the style of the lyricContentDiv for it to stretch across the width of the column.

 
Aquilax Script's Author

Thank Lissia, I will add it in the next version, I'm preparing it but at the moment I have less free time.

 
lissia User

hey! thank you very much for this script, i really love it. I also added an additional site with an extra focus on german lyrics. would be cool if you add it to the next version. patch:

--- youtubelyrics.2.10.00.user.js	2008-07-22 16:22:26.000000000 +0200
+++ youtubelyrics-magistrix.user.js	2008-07-22 16:32:20.000000000 +0200
@@ -84,7 +84,7 @@
 

 		var prefLyricSite=GM_getValue("prefLyricSite");

 		

-		var array1=["lyricwiki.org","lyrics.astraweb.com","metrolyrics.com","musica.com","get-lyric.net","lyricsdownload.com","lyricsondemand.com","sweetslyrics.com","songmeanings.net","lyrics.com"];

+		var array1=["lyricwiki.org","lyrics.astraweb.com","metrolyrics.com","musica.com","get-lyric.net","lyricsdownload.com","lyricsondemand.com","sweetslyrics.com","songmeanings.net","lyrics.com","magistrix.de"];

 		for(var num1=0;num1<array1.length;num1++)

 		{

 			var option1=document.createElement("OPTION");

@@ -352,6 +352,7 @@
 		case "sweetslyrics.com":

 		case "songmeanings.net":

 		case "lyrics.com":

+		case "magistrix.de":

 			text3="http://www.google.com/search?num=20&q=site%3A"+encodeURIComponent(ScriptInfos.site)+"+"+text2;

 			break;

 		case "lyrics.astraweb.com":

@@ -411,6 +412,9 @@
 			break;

 		case "lyrics.com":

 			text1="<a.*?href=\"(http://www."+ScriptInfos.site+".*?)\".*?>"+ScriptInfos.site+" - (.*?)</a>";

+			break;
+		case "magistrix.de":
+			text1="<a.*?href=\"(http://www."+ScriptInfos.site+"/lyrics/(?:[^\"]*?)/(?:[^\"]*?.html))\".*?>Songtext: (.*?)</a>";
 			break;

 		default:

 			setLyricDivContent("No implementation found for "+ScriptInfos.site);

@@ -474,6 +478,9 @@
 			break;

 		case "lyrics.com":

 			text1="<title>"+ScriptInfos.site+"  - (.*?)</title>(?:.|\n|\r)*?document\\.write\\(\"<br><lyrics>(.*?)\"\\);";

+			break;
+		case "magistrix.de":
+			text1="<h1 class=\"mainTitle\"><b><i>(.*?)</i></b></h1>(?:.|\n|\r)*?<p id=\"lyricText\" style=\"\">((?:.|\n|\r)*?)</p>";
 			break;

 		default:

 			setLyricDivContent("No implementation found for "+ScriptInfos.site);

 
Aquilax Script's Author

@Joe, thank you Joe for the feedback, at the moment I have not much time to improve it, I will think about it in a near future.

 
JoeSimmons Scriptwright

Awesome script but it should search all the sites, not just one. I was watching a video once, and the script didn't find lyrics, but when I switched to the next site, it did. I think it should switch to the first site that it finds lyrics on.

 
Aquilax Script's Author

@Rytis

Thanks for the feed back, but I cound't replicate the bug, moreover in my script I haven't any function called „getBoxObjectFor()“, most probably is another script that generate that error. Try to disable one after the other all the others scripts running on the same page and reload the page after each disabled script and check if youtube lyrics starts to work. Can you then tell me if you have found any script that cause youtube lyrics to don't work?

 
Rytis User

Not works after update.

Maybe this?
Įspėjimas: Funkcija „getBoxObjectFor()“ laikoma pasenusia. Jei įmanoma, naudokite „element.getBoundingClientRect()“.
Pirminis failas: http://www.youtube.com/watch?v=RMWXyEHoN88&...

(Warning: function „getBoxObjectFor()“ consider as old. If possible, use „element.getBoundingClientRect()“.)

 
asiangirlphoto User

can you add my site http://www.21asianews.com/