10 __title__ =
'azlyrics'
19 self.
url =
'https://www.azlyrics.com/lyrics/%s/%s.html'
22 log(
'%s: searching lyrics for %s - %s' % (__title__, song.artist, song.title), debug=self.
DEBUG)
23 lyrics = Lyrics(settings=self.
settings)
25 lyrics.source = __title__
27 artist = re.sub(
"[^a-zA-Z0-9]+",
"", song.artist).lower().lstrip(
'the ')
28 title = re.sub(
"[^a-zA-Z0-9]+",
"", song.title).lower()
30 req = requests.get(self.
url % (artist, title), timeout=10)
36 lyricscode = response.split(
't. -->')[1].split(
'</div')[0]
37 lyricstext = html.unescape(lyricscode).replace(
'<br />',
'\n')
38 lyr = re.sub(
'<[^<]+?>',
'', lyricstext)