def lyrics_from_song_path(path):
# gotta go regular html scraping... come on Genius
page_url = "
http://genius.com" + path
page = requests.get(page_url)
html = BeautifulSoup(page.text, "html.parser")
# remove script tags that they put in the middle of the lyrics
[h.extract() for h in html('script')]
# at least Genius is nice and has a tag called 'lyrics'!
lyrics = html.find('div', class_='lyrics').get_text() # updated css where the lyrics are based in HTML
return lyrics
This code used to work a couple days ago, but all of a sudden it stopped working. The html is being extracted correctly, but for some reason html.find is always returning none, even though it would actually get the lyrics a couple days ago. Any idea why this is happening?