def getLyrics(artist_tuple, album_tuple, song_tuple): soup = BeautifulSoup(getHtml(song_tuple[1], False, 'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30')) lyrics = soup.select('#kashi_main')[0] lyrics.div.extract() return cleanLyricList(lyrics.contents) songs = soup.select('.lyrics h3') for song in songs: if song.string[song.string.index(' ')+1:] == song_tuple[0]: lyrics = [] while song.next_sibling.name not in ['h3','div','a']: song = song.next_sibling lyrics += [song] return cleanLyricList(lyrics) return ""
def getLyrics(artist_tuple, album_tuple, song_tuple): soup = BeautifulSoup( getHtml( song_tuple[1], False, 'Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30' )) lyrics = soup.select('#kashi_main')[0] lyrics.div.extract() return cleanLyricList(lyrics.contents) songs = soup.select('.lyrics h3') for song in songs: if song.string[song.string.index(' ') + 1:] == song_tuple[0]: lyrics = [] while song.next_sibling.name not in ['h3', 'div', 'a']: song = song.next_sibling lyrics += [song] return cleanLyricList(lyrics) return ""
def getLyrics(artist_tuple, album_tuple, song_tuple): soup = BeautifulSoup(getHtml(DARKLYRICS_URL + song_tuple[1])) songs = soup.select('.lyrics h3') for song in songs: if song.string[song.string.index(' ') + 1:] == song_tuple[0]: lyrics = [] while song.next_sibling.name not in ['h3', 'div', 'a']: song = song.next_sibling lyrics += [song] return cleanLyricList(lyrics) return None
def getLyrics(artist_tuple, album_tuple, song_tuple): soup = BeautifulSoup(getHtml(DARKLYRICS_URL+song_tuple[1])) songs = soup.select('.lyrics h3') for song in songs: if song.string[song.string.index(' ')+1:] == song_tuple[0]: lyrics = [] while song.next_sibling.name not in ['h3','div','a']: song = song.next_sibling lyrics += [song] return cleanLyricList(lyrics) return None
def getLyrics(artist_tuple, album_tuple, song_tuple): soup = BeautifulSoup(getHtml(WIKIA_DOMAIN+song_tuple[1])) lyricsdiv = soup.select('div.lyricbox')[0] if lyricsdiv.select('a[href=/Category:Instrumental]'): lyrics = "(Instrumental)" else: # Remove divs and crap from wiki lyrics box for div in lyricsdiv('div'): div.extract() comments = lyricsdiv.find_all(text=lambda text:isinstance(text, Comment)) for comment in comments: comment.extract() return unescape(cleanLyricList(lyricsdiv.contents))
def getLyrics(artist_tuple, album_tuple, song_tuple): soup = BeautifulSoup(getHtml(WIKIA_DOMAIN + song_tuple[1])) lyricsdiv = soup.select('div.lyricbox')[0] if lyricsdiv.select('a[href=/Category:Instrumental]'): lyrics = "(Instrumental)" else: # Remove divs and crap from wiki lyrics box for div in lyricsdiv('div'): div.extract() comments = lyricsdiv.find_all( text=lambda text: isinstance(text, Comment)) for comment in comments: comment.extract() return unescape(cleanLyricList(lyricsdiv.contents))
def getLyrics(artist_tuple, album_tuple, song_tuple): soup = BeautifulSoup(getHtml(NIGHTWISH_URL + song_tuple[1])) lyricsoup = soup.select('.content_main_2c .text')[0] return cleanLyricList(lyricsoup.contents)
def getLyrics(artist_tuple, album_tuple, song_tuple): soup = BeautifulSoup(getHtml(NIGHTWISH_URL+song_tuple[1])) lyricsoup = soup.select('.content_main_2c .text')[0] return cleanLyricList(lyricsoup.contents)