Update your iTunes library with lyrics

There's a lot of apps for adding lyrics to songs in iTunes automatically, but they all work with LyricWiki API which returns only a small part of lyrics and a URL of the page with full lyrics (because of damn copyright owners).

The solution is to parse LyricWiki HTML pages. BeautifulSoup is great for that. Then we can use a simple AppleScript which will call our Python script and insert the result into the right place.

First, download soupselect and put it somewhere at your PYTHONPATH. Save getlyrics.py to /usr/bin (or to some other place and make a symlink to /usr/bin) and chmod +x it. Then save the applescript to /Users/<your username>/Library/iTunes/Scripts under the name "Get Lyrics.scpt". Go to iTunes, select a few songs and click Scripts → Get Lyrics.

Screen_shot_2010-11-20_at_9

Select only two-three songs at once - looks like LyricWiki throttles our requests and we must have a small delay between them.

P.S. Thanks to Pepelsbey for Year to Album Sort script.