def lyricsmode(song):
translate = {<EOL>URLESCAPE: '<STR_LIT>',<EOL>'<STR_LIT:U+0020>': '<STR_LIT:_>'<EOL>}<EOL>artist = song.artist.lower()<EOL>artist = normalize(artist, translate)<EOL>title = song.title.lower()<EOL>title = normalize(title, translate)<EOL>artist = re.sub(r'<STR_LIT>', '<STR_LIT:_>', artist)<EOL>title = re.sub(r'<STR_LIT>', '<STR_LIT:_>', title)<EOL>if artist[<NUM_LIT:0>:<NUM_LIT:4>].lower() == '<STR_LIT>':<EOL><INDENT>artist = artist[<NUM_LIT:4>:]<EOL><DEDENT>if artist[<NUM_LIT:0>:<NUM_LIT:2>].lower() == '<STR_LIT>':<EOL><INDENT>prefix = artist[<NUM_LIT:2>]<EOL><DEDENT>else:<EOL><INDENT>prefix = artist[<NUM_LIT:0>]<EOL><DEDENT>url = '<STR_LIT>'<EOL>url = url.format(prefix, artist, title)<EOL>soup = get_url(url)<EOL>content = soup.find(id='<STR_LIT>')<EOL>return content.get_text().strip()<EOL>
Returns the lyrics found in lyricsmode.com for the specified mp3 file or an
empty string if not found.