def letras(song):
translate = {<EOL>'<STR_LIT:&>': '<STR_LIT:a>',<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>url = '<STR_LIT>'.format(artist, title)<EOL>soup = get_url(url)<EOL>if not soup:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>found_title = soup.select_one('<STR_LIT>')<EOL>if not found_title:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>found_title = found_title.get_text()<EOL>found_title = re.sub(r'<STR_LIT>', '<STR_LIT>', found_title.lower())<EOL>if found_title != re.sub(r'<STR_LIT>', '<STR_LIT>', song.title.lower()):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>content = soup.find('<STR_LIT>')<EOL>if not content:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>text = '<STR_LIT>'<EOL>for br in content.find_all('<STR_LIT>'):<EOL><INDENT>br.replace_with('<STR_LIT:\n>')<EOL><DEDENT>for p in content.find_all('<STR_LIT:p>'):<EOL><INDENT>text += p.get_text() + '<STR_LIT>'<EOL><DEDENT>return text.strip()<EOL>
Returns the lyrics found in letras.com for the specified mp3 file or an
empty string if not found.