Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
My personal lyric scraper

Does the lyrics wiki have any way that enables songs in iTunes to auto-add the lyrics when a song is played or does it have to be done manually?

No. They got hit with the 'copyright' thing, and lyrics can only be previewed via program API, but viewed in full via their website. They've made it very difficult to copy and paste as well. That's why I made the script below. It may or may not be of use to you.

This isn't an 'automatic' lyrics grabber, I review all my lyrics before adding it. Also, I'd recommend at least a little experience in AppleScripts before diving in.

I made this script to grab lyrics. Read the comments at the top of the bit for some info. It should work for you, but if it doesn't, try cleaning up your song title and artist tags. Save this to your ~/Library/iTunes/Scripts/ folder, and create an application keyboard shortcut in System Preferences -> Keyboard -> Keyboard Shortcuts, left pane, select the item 'Application Shortcuts' and click the "+" to the right below the panes.

20100506-cwk6ut9xx1tq44e4i6mqaie11w.jpg

Code:
(*This 'Lyrics via LyricWiki' based on Doug Adams of dougscripts.com
[B]Modified by sammich. Using this script carries no warranty whatsoever.
[/B]
This script requires that you create a workflow (and save it as .workflow).
Recreate the workflow in the screenshot below:
	http://img.skitch.com/20100506-k6j5us6fm38itaj4e6tptmekhj.jpg
Then go about halfway down the script and type in the path of the workflow.

This script will grab the current playing song and search for it at lyrics.wikia.org 
omitting any text inside brackets or certain special characters. It will parse the
search page and give a list of hits. Select a hit to retrieve the lyrics for that page.

A list with the lyrics will appear, and press enter to save it to the song.

This is a personal script and has enhancements only to my
library. Feel free to modify this code to suit your library.
*)

tell application "iTunes"
	if player state is playing then
		set sel to current track
		tell sel to set {tname, tartist} to {get name, get artist}
	else if selection is not {} and (count items of selection) is 1 then
		set sel to item 1 of selection
		tell sel to set {tname, tartist} to {get name, get artist}
	else
		return
	end if
	set currentsong to database ID of current track
	
	-- checks against a playlist of good lyrics in library
	(*
	set goodlist to playlist "** Good Lyrics" -- replace this with your playlist name and remove comment brackets
	set posi to player position
	set mylist to get database ID of every track in goodlist
	if mylist contains currentsong then
		set result to display dialog "Lyrics for this song are good. Go ahead and look anyway?"
	end if
	*)
end tell

if tname is "" or tartist is "" then
	tell application "iTunes" to display dialog "The track does not have enough information to search LyricWiki." buttons {"OK"} with icon 0 with title my_title
	return
end if

set remove_backet to offset of "[" in tname
if remove_backet is greater than 0 then
	set tname to characters 1 thru (remove_backet - 2) of tname as text
end if
set remove_backet to offset of "(" in tname
if remove_backet is greater than 0 then
	set tname to characters 1 thru (remove_backet - 2) of tname as text
end if
set listartist to words of tartist
set tartist to ""
repeat with artword in listartist
	if artword contains "Feat" then
		exit repeat
	end if
	set tartist to tartist & " " & artword
end repeat

if character 1 of tartist is " " then set tartist to characters 2 thru ((length of tartist)) of tartist as text
set theurl to "http://lyrics.wikia.com/Special:Search?search=" & tartist & "+" & tname & "&go=1"
set theurl to my replace_chars(theurl, " ", "+")
set resultslist to extract_search_results(theurl, tname, tartist)
if item 1 of resultslist is equal to "terminate" then return
set opt to (choose from list resultslist with prompt ("Results for: " & tname & ", " & tartist) as text OK button name "Use this result")
if opt is false then return
do shell script "echo \"" & opt & "\" > /tmp/lyrurl"

-- TYPE IN THE LOCATION OF YOUR .workflow
do shell script "automator /location_of_scrapeLyrics.workflow"


set foo to (open for access ("/tmp/lyrics"))
set txt to (read foo for (get eof foo) as Unicode text)
close access foo
set displayLyrics to paragraphs in txt
set final to {}
set startrecording to false
repeat with listitem in displayLyrics
	if listitem contains "Ringtone to your Cell" and startrecording = true then
		exit repeat
	end if
	if startrecording is equal to true then
		set listitem to listitem & "
"
		set final to final & listitem
	end if
	if listitem contains "Ringtone to your Cell" then
		set startrecording to true
	end if
end repeat

tell application "iTunes"
	set opt to (choose from list final with prompt (tartist & return & "\"" & tname & "\"") as text OK button name "Use Lyrics for Track" with empty selection allowed)
	if opt is false then return
	try
		set final to final as text
		set final to characters 1 thru ((length of final) - 1) of final as text
		set sel's lyrics to (final as text)
	end try
end tell

on replace_chars(txt, srch, repl)
	set AppleScript's text item delimiters to the srch
	set the item_list to every text item of txt
	set AppleScript's text item delimiters to the repl
	set txt to the item_list as string
	set AppleScript's text item delimiters to ""
	return txt
end replace_chars

on extract_search_results(resultURL, tname, tartist)
	set limiter to 1 -- limits to 10 results
	try
		set scrape to do shell script "curl -L " & quoted form of resultURL & " | grep  mw-search-result-title"
	on error
		set dialogResult to display dialog "Song does not exist on lyrics.wikia.com." buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" giving up after 15 default answer tname & " " & tartist & " - " & resultURL
		set resultlist to {"terminate"}
		return resultlist
	end try
	set resultlist to {}
	set somelist to paragraphs of scrape
	repeat with listitem in somelist
		set limiter to limiter + 1
		set classpos to offset of "class=" in listitem
		set href to characters 14 thru (classpos - 3) of listitem as string
		set href to replace_chars(href, "'", "'")
		set href to replace_chars(href, "%20", "_")
		set href to replace_chars(href, "%27", "'")
		set href to replace_chars(href, "%28", "(")
		set href to replace_chars(href, "%29", ")")
		set href to replace_chars(href, "%3A", ":")
		set resultlist to resultlist & href
		if limiter is greater than or equal to 10 then exit repeat
	end repeat
	return resultlist
end extract_search_results
 
This isn't an 'automatic' lyrics grabber, I review all my lyrics before adding it. Also, I'd recommend at least a little experience in AppleScripts before diving in.

I made this script to grab lyrics. Read the comments at the top of the bit for some info. It should work for you, but if it doesn't, try cleaning up your song title and artist tags. Save this to your ~/Library/iTunes/Scripts/ folder, and create an application keyboard shortcut in System Preferences -> Keyboard -> Keyboard Shortcuts, left pane, select the item 'Application Shortcuts' and click the "+" to the right below the panes.

Thanks, I'll give it a go and see how I get on.
 
Get Lyrical is the BEST and only lyrics software i've used. And I love it. I'm not sure if it's still not working for people, but it works for me. At first I had a problem and it wasn't working, but I think I just didn't understand how to work it at first.
 
I've been using the widget, Harmonic, for a long time. It worked great but recently stopped fetching lyrics for entire songs. It now gets the first couple lines and ends with something like this: [....].

Strange.
 
I've been using the widget, Harmonic, for a long time. It worked great but recently stopped fetching lyrics for entire songs. It now gets the first couple lines and ends with something like this: [....].

Strange.

Yes, Harmonic has some license issues with lyrics. I still use it to display lyrics in the Dashboard, as well as to manually search for lyrics on the currently playing song. For batch lyrics, Get Lyrical is the best I've found. For the handful of songs it doesn't find, I manually search by clicking the
searchicon.png
icon in Harmonic.
 
Interestingly enough, the only one that works after the lawsuits is in Italian. Luckily it also has the option for English.

I looked around for a few hours, and this is the only program that would automatically download lyrics: http://lyricsdownloader.altervista.org/sito/?q=node/2

I think the fact that it is an italian program it's not a problem: in fact, both the program and the website are in Italian and in English.
Anyway, I agree with you. It is the best I've tried.
 
Another vote here for "Get Lyrical" this app is simply amazing. I have a diverse 13k mp3 collection and have been amazed by its accuracy. I believe I have only manually had to add 1 album so far in several days of use. I just run it in the background while listening to my music and select "active tagging."
 
Another vote here for "Get Lyrical" this app is simply amazing. I have a diverse 13k mp3 collection and have been amazed by its accuracy. I believe I have only manually had to add 1 album so far in several days of use. I just run it in the background while listening to my music and select "active tagging."
In my opinion, Fabio's iTunes Lyrics downloader is far better. It is more rich of options and faster imho.
 
In my opinion, Fabio's iTunes Lyrics downloader is far better. It is more rich of options and faster imho.
In what way is it better? What options does it have that Get Lyrical doesn't have? Is it only your opinion, or do you have facts to support that view?
 
Another vote here for "Get Lyrical" this app is simply amazing. I have a diverse 13k mp3 collection and have been amazed by its accuracy. I believe I have only manually had to add 1 album so far in several days of use. I just run it in the background while listening to my music and select "active tagging."

I've just downloaded Get Lyrical, and I won't say it's the best out there, but only because I haven't bothered trying any others. It works fine, and for the 120 out of my 2055 songs I've done, it seems to have chosen good sources for lyrics. If you want to get the best out of it, click on your music library in Itunes, go to "Get Lyricals" File drop down box and choose download current library, rather than Selection or Current from the GUI.

Oh, and because I'm impatient, I've also got active tagging on. Now up to 151 successful downloads, admittedly out of 200, but 76% hit rate is pretty reasonable. It only seems to miss random albums, like my "Masters of Chant" Gregorian Chants album.
 
Get Lyrical & iClip Lyrics 2

I've been using Get Lyrical for ages now - I have roughly 15,500 tracks. It did work great until the copyright laws kicked in. Then it started putting one or two lines and an apology about the rest missing due to copyright laws.... not a lot of use to me as now my tracks think they have lyrics when in fact they don't. Then it started putting in random lyrics from god knows where - the title at the top would be correct but the lyrics were not even for the same artist.

However, it has, over time, completed the lyrics for the majority of my music and it's really easy to use. You can select thousands of tracks at a time and just leave it chugging away bringing in the lyrics. It also gives you a list of the ones it couldn't find lyrics for (hence the part lyrics being a real pain!). You have to have the track name/artist name spelled correctly (all apostrophe's, hyphens etc in the right places too) or it will return a can't find verdict.

I use this in conjunction with another lyric finder called iClip Lyrics 2. I use the second one to find the lyrics that Get Lyrical can't - and it nearly always succeeds when the other fails. It is one that you have to be playing the song that you want to look for the lyrics for.... but it's awesome and really easy to use and you're only using it to fill in the few blanks from the Get Lyrical search. If it can't auto fill the lyrics then you click on the search icon and it takes you straight to the web where it offers you multiple choices of where to find the lyrics. Once found you highlight the lyrics and then click "Clip Lyrics" and it auto fills them into iTunes.

I've spent ages looking for something to work better than this combination but I can't find anything.... guess, for the time being, I got it right first time! :)
 
I've spent ages looking for something to work better than this combination but I can't find anything.... guess, for the time being, I got it right first time! :)

I use TunesTEXT in dashboard widget form and it always finds the lyrics for me...
 
No. They got hit with the 'copyright' thing, and lyrics can only be previewed via program API, but viewed in full via their website. They've made it very difficult to copy and paste as well. That's why I made the script below. It may or may not be of use to you.

This isn't an 'automatic' lyrics grabber, I review all my lyrics before adding it. Also, I'd recommend at least a little experience in AppleScripts before diving in.

I made this script to grab lyrics. Read the comments at the top of the bit for some info. It should work for you, but if it doesn't, try cleaning up your song title and artist tags. Save this to your ~/Library/iTunes/Scripts/ folder, and create an application keyboard shortcut in System Preferences -> Keyboard -> Keyboard Shortcuts, left pane, select the item 'Application Shortcuts' and click the "+" to the right below the panes.

20100506-cwk6ut9xx1tq44e4i6mqaie11w.jpg

Code:
(*This 'Lyrics via LyricWiki' based on Doug Adams of dougscripts.com
[B]Modified by sammich. Using this script carries no warranty whatsoever.
[/B]
This script requires that you create a workflow (and save it as .workflow).
Recreate the workflow in the screenshot below:
	http://img.skitch.com/20100506-k6j5us6fm38itaj4e6tptmekhj.jpg
Then go about halfway down the script and type in the path of the workflow.

This script will grab the current playing song and search for it at lyrics.wikia.org 
omitting any text inside brackets or certain special characters. It will parse the
search page and give a list of hits. Select a hit to retrieve the lyrics for that page.

A list with the lyrics will appear, and press enter to save it to the song.

This is a personal script and has enhancements only to my
library. Feel free to modify this code to suit your library.
*)

tell application "iTunes"
	if player state is playing then
		set sel to current track
		tell sel to set {tname, tartist} to {get name, get artist}
	else if selection is not {} and (count items of selection) is 1 then
		set sel to item 1 of selection
		tell sel to set {tname, tartist} to {get name, get artist}
	else
		return
	end if
	set currentsong to database ID of current track
	
	-- checks against a playlist of good lyrics in library
	(*
	set goodlist to playlist "** Good Lyrics" -- replace this with your playlist name and remove comment brackets
	set posi to player position
	set mylist to get database ID of every track in goodlist
	if mylist contains currentsong then
		set result to display dialog "Lyrics for this song are good. Go ahead and look anyway?"
	end if
	*)
end tell

if tname is "" or tartist is "" then
	tell application "iTunes" to display dialog "The track does not have enough information to search LyricWiki." buttons {"OK"} with icon 0 with title my_title
	return
end if

set remove_backet to offset of "[" in tname
if remove_backet is greater than 0 then
	set tname to characters 1 thru (remove_backet - 2) of tname as text
end if
set remove_backet to offset of "(" in tname
if remove_backet is greater than 0 then
	set tname to characters 1 thru (remove_backet - 2) of tname as text
end if
set listartist to words of tartist
set tartist to ""
repeat with artword in listartist
	if artword contains "Feat" then
		exit repeat
	end if
	set tartist to tartist & " " & artword
end repeat

if character 1 of tartist is " " then set tartist to characters 2 thru ((length of tartist)) of tartist as text
set theurl to "http://lyrics.wikia.com/Special:Search?search=" & tartist & "+" & tname & "&go=1"
set theurl to my replace_chars(theurl, " ", "+")
set resultslist to extract_search_results(theurl, tname, tartist)
if item 1 of resultslist is equal to "terminate" then return
set opt to (choose from list resultslist with prompt ("Results for: " & tname & ", " & tartist) as text OK button name "Use this result")
if opt is false then return
do shell script "echo \"" & opt & "\" > /tmp/lyrurl"

-- TYPE IN THE LOCATION OF YOUR .workflow
do shell script "automator /location_of_scrapeLyrics.workflow"


set foo to (open for access ("/tmp/lyrics"))
set txt to (read foo for (get eof foo) as Unicode text)
close access foo
set displayLyrics to paragraphs in txt
set final to {}
set startrecording to false
repeat with listitem in displayLyrics
	if listitem contains "Ringtone to your Cell" and startrecording = true then
		exit repeat
	end if
	if startrecording is equal to true then
		set listitem to listitem & "
"
		set final to final & listitem
	end if
	if listitem contains "Ringtone to your Cell" then
		set startrecording to true
	end if
end repeat

tell application "iTunes"
	set opt to (choose from list final with prompt (tartist & return & "\"" & tname & "\"") as text OK button name "Use Lyrics for Track" with empty selection allowed)
	if opt is false then return
	try
		set final to final as text
		set final to characters 1 thru ((length of final) - 1) of final as text
		set sel's lyrics to (final as text)
	end try
end tell

on replace_chars(txt, srch, repl)
	set AppleScript's text item delimiters to the srch
	set the item_list to every text item of txt
	set AppleScript's text item delimiters to the repl
	set txt to the item_list as string
	set AppleScript's text item delimiters to ""
	return txt
end replace_chars

on extract_search_results(resultURL, tname, tartist)
	set limiter to 1 -- limits to 10 results
	try
		set scrape to do shell script "curl -L " & quoted form of resultURL & " | grep  mw-search-result-title"
	on error
		set dialogResult to display dialog "Song does not exist on lyrics.wikia.com." buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" giving up after 15 default answer tname & " " & tartist & " - " & resultURL
		set resultlist to {"terminate"}
		return resultlist
	end try
	set resultlist to {}
	set somelist to paragraphs of scrape
	repeat with listitem in somelist
		set limiter to limiter + 1
		set classpos to offset of "class=" in listitem
		set href to characters 14 thru (classpos - 3) of listitem as string
		set href to replace_chars(href, "'", "'")
		set href to replace_chars(href, "%20", "_")
		set href to replace_chars(href, "%27", "'")
		set href to replace_chars(href, "%28", "(")
		set href to replace_chars(href, "%29", ")")
		set href to replace_chars(href, "%3A", ":")
		set resultlist to resultlist & href
		if limiter is greater than or equal to 10 then exit repeat
	end repeat
	return resultlist
end extract_search_results

I know this thread is quite old and besides I can't actually create that script I just wanted to ask you: would this still work also with uneditable gracenote lyrics from lyrics.wikia?
 
I made this script to grab lyrics...

This looks great sammich. Is there any chance you could create a version that would grab lyrics automatically when a new song started in iTunes (assuming lyrics are not already present), and save them to the mp3 without having to review them first? GimmeSomeTune and TunesText no longer work. Fabio's Downloader doesn't do this automatically. GetLyrical does this but it's an ugly icon in the dock, and I just want this to run in the background.
 
If it's an icon you're worried about, you can always change it. GetLyrical works fine. I also use pearLyrics.

It's not so much the icon graphic as it is the appearance of an icon at all. I don't want to clutter my dock with a program that I want running on my computer all the time and never need to see/change/update.

If not in the background, I would be fine with a menubar icon or even a dashboard widget.
 
I know this thread is quite old and besides I can't actually create that script I just wanted to ask you: would this still work also with uneditable gracenote lyrics from lyrics.wikia?

Yes. I originally created this script so that I could get the Gracenote lyrics easily. I still use this script occasionally.

Note, however the Gracenote lyrics are sometimes quite off. Sometimes it looks like the lyrics are generated by speech recognition software. Quite often, similar sounding words or phrases are used instead. For popular songs, it's better to go with the community lyrics, for rarer ones, go with the Gracenote.

I'm quite picky about having correct lyrics.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.