Beispiel #1
0
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 ""
Beispiel #2
0
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 ""
Beispiel #3
0
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
Beispiel #4
0
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
Beispiel #5
0
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))
Beispiel #6
0
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))
Beispiel #7
0
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)
Beispiel #8
0
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)