diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 1f215df45..e73c3bc8a 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -401,7 +401,12 @@ class Genius(Backend): # all of the lyrics can be found already correctly formatted # Sometimes, though, it packages the lyrics into separate divs, most # likely for easier ad placement - lyrics_div = soup.find("div", class_="lyrics") + + lyrics_div = soup.find("div", {"data-lyrics-container": True}) + + for br in lyrics_div.find_all("br"): + br.replace_with("\n") + if not lyrics_div: self._log.debug('Received unusual song page html') verse_div = soup.find("div", @@ -429,7 +434,6 @@ class Genius(Backend): class_=re.compile("Lyrics__Footer")) for footer in footers: footer.replace_with("") - return lyrics_div.get_text() diff --git a/test/rsrc/lyrics/geniuscom/Ttngchinchillalyrics.txt b/test/rsrc/lyrics/geniuscom/Ttngchinchillalyrics.txt new file mode 100644 index 000000000..fa28a1b2a --- /dev/null +++ b/test/rsrc/lyrics/geniuscom/Ttngchinchillalyrics.txt @@ -0,0 +1,864 @@ + + + + TTNG – Chinchilla Lyrics | Genius Lyrics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

🚧  The new song page is now the default experience! We need your help to continue improving contributor features.  🚧

+
So far we've lost focus
Let's just concentrate on words that could mean everything

On nights like this
We drink ourselves dry
And make promises
Without intention

So fortunate that this was brought up
The last time. As I recall
I can’t hold up your every expectation

On nights like this
We drink ourselves dry
And make promises
Without intention

My God, is this what we’ve become?
Living parodies of love and loss
Can we really be all that lost?

So fortunate that this was brought up
The last time. As I recall
I can’t hold up your every expectation

One moment to another I am restless
Seems making love forever can often risk your heart
And I cannot remember when I was this messed up
In service of another I am beautiful
How to Format Lyrics:
  • Type out all lyrics, even if it’s a chorus that’s repeated throughout the song
  • The Section Header button breaks up song sections. Highlight the text then click the link
  • Use Bold and Italics only to distinguish between different singers in the same verse.
    • E.g. “Verse 1: Kanye West, Jay-Z, Both
  • Capitalize each line
  • To move an annotation to different lyrics in the song, use the [...] menu to switch to referent editing mode

About

This song bio is unreviewed
Genius Annotation

This song is about those relationships with a lot of fights and reconciliations. The singer and his couple are aruging/reconciliating, telling themselves everything is going to be better and things will change for good, specially when they get drunk, just to fight and reconciliate over and over again.

Ask us a question about this song
No questions asked yet
Credits
Written By
Stuart Smith
Release Date
October 13, 2008
Tags
Comments
Add a comment
Get the conversation started
Be the first to comment
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/test_lyrics.py b/test/test_lyrics.py index 3adf6e359..57f5ce13d 100644 --- a/test/test_lyrics.py +++ b/test/test_lyrics.py @@ -457,7 +457,7 @@ class GeniusScrapeLyricsFromHtmlTest(GeniusBaseTest): def test_good_lyrics(self): """Ensure we are able to scrape a page with lyrics""" - url = 'https://genius.com/Wu-tang-clan-cream-lyrics' + url = 'https://genius.com/Ttng-chinchilla-lyrics' mock = MockFetchUrl() self.assertIsNotNone(genius._scrape_lyrics_from_html(mock(url)))