def get_lyrics(song, l_sources=None):
if l_sources is None:<EOL><INDENT>l_sources = sources<EOL><DEDENT>if song.lyrics and not CONFIG['<STR_LIT>']:<EOL><INDENT>logger.debug('<STR_LIT>', song)<EOL>return None<EOL><DEDENT>runtimes = {}<EOL>source = None<EOL>for l_source in l_sources:<EOL><INDENT>start = time.time()<EOL>try:<EOL><INDENT>lyrics = l_source(song)<EOL><DEDENT>except (HTTPError, HTTPException, URLError, ConnectionError):<EOL><INDENT>lyrics = '<STR_LIT>'<EOL><DEDENT>runtimes[l_source] = time.time() - start<EOL>if lyrics != '<STR_LIT>':<EOL><INDENT>source = l_source<EOL>break<EOL><DEDENT><DEDENT>if lyrics != '<STR_LIT>':<EOL><INDENT>logger.info('<STR_LIT>', source.__name__, song)<EOL>song.lyrics = lyrics<EOL><DEDENT>else:<EOL><INDENT>logger.info("<STR_LIT>", song)<EOL>source = None<EOL><DEDENT>return Result(song, source, runtimes)<EOL>
Searches for lyrics of a single song and returns a Result object with the
various stats collected in the process.

The optional parameter 'sources' specifies an alternative list of sources.
If not present, the main list will be used.