Last.fm - Lyrics

By escapist Last update Apr 2, 2012 — Installed 25,809 times.

Lyrics Not Found

in
Subscribe to Lyrics Not Found 4 posts, 3 voices



hertan User
FirefoxWindows

First of all thank you for your sharing this kind of user scripts (I think I have written my problem firstly in wrong place in review, sorry for that). Today it returns "Not Found" for all songs(even simple ones like the_beatles-let_it_be) although it was working very well a few days ago. In error console it says breadcrumb is null. What is the problem how can I fix it?

Thanks in advance..

 
hertan User
FirefoxWindows

Ok I fixed it I have replaced the following line as 0=>1 (second element of array)
artist = breadcrumb.getElementsByTagName("a")[0].textContent;
I do not know why this happened may be something changed in lastfm page. Actually it was returning "Music" for variable artist so it could not find lyrics.

 
Stealthx User
FirefoxWindows

Thanks so much for the fix, was a little confusing to me at first so if anyone else needs to know exactly what to change, do this:

Look for the line:
artist = breadcrumb.getElementsByTagName("a")[0].textContent;
And change the 0 in that line to 1
So it looks like this:
artist = breadcrumb.getElementsByTagName("a")[1].textContent;

 
escapist Script's Author
FirefoxWindows

Thanks for the bug report, hertan, and thanks for taking the time to fix it :) I've updated the script with your change.

Now, if only Last.fm could give the key fields on their track pages meaningful identifiers, or at the very least stop messing around with the DOM..