def _do_fetch(self, title, artist): sr = lyricwiki.get_lyrics(artist, title) if sr is None: sr = [] else: sr = [sr] sr = map(lambda x: u"%s \nSource: lyrics.wikia.com" % x, sr) return sr
def from_url(self): self.lyrics.set_info("fetching lyrics...") lyrics = lyricwiki.get_lyrics(self.url) if self.abort: return if lyrics: self.save_lyrics(lyrics) self.lyrics.set_lyrics(lyrics) else: self.lyrics.set_info("some kind of error occurred while fetching the lyrics, try again!")
def from_url(self): self.lyrics.set_info("fetching lyrics...") lyrics = lyricwiki.get_lyrics(self.url) if self.abort: return if lyrics: self.save_lyrics(lyrics) self.lyrics.set_lyrics(lyrics) else: self.lyrics.set_info( "some kind of error occurred while fetching the lyrics, try again!" )