beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.78k stars 1.82k forks source link

Lyrics Plugin has trouble with the way Genius has their HTML setup #5221

Closed HomerHaddock closed 5 months ago

HomerHaddock commented 5 months ago

Problem

After running the lyrics plugin on some songs (example will be: Lemon Demon - The Ultimate Showdown of Ultimate Destiny from Dinosaurchestra)

$ beet -vv lyrics The Ultimate Showdown

It grabs the lyrics from Genius to then be saved, this all seems fine without any actual errors logged.

lyrics: got lyrics from backend: Genius
lyrics: fetched lyrics: Lemon Demon - 2022 - Dinosaurchestra: The Ultimate Showdown of Ultimate Destiny (3:33)

The lyrics come from here.

But instead of the lyrics being what is seen on the webpage the lyrics are

[Verse 1]
Old Godzilla was hopping around
Tokyo city like a big playground
When suddenly Batman burst from the shade
And hit Godzilla with a bat grenade
Godzilla got pissed and began to attack
But didn't expect to be blocked by Shaq
Who proceeded to open up a can of Shaq-Fu
When Aaron Carter came out of the blue
And he started beating up Shaquille O'Neal
Then they both got flattened by the Batmobile
But before it could make it back to the Batcave
Abraham Lincoln popped out of his grave
And took an AK-47 out from under his hat
And blew Batman away with a rat-a-tat-tat
But he ran out of bullets and he ran away
Because Optimus Prime came to save the day

[Chorus]
This is the ultimate showdown of ultimate destiny
Good guys, bad guys and explosions, as far as the eye can see
And only one will survive, I wonder who it will be
This is the ultimate showdown of ultimate destiny

[Verse 2]
Godzilla took a bite out of Optimus Prime
Like Scruff McGruff took a bite out of crime
And then Shaq came back covered in a tire track
But Jackie Chan jumped out and landed on his back
And Batman was injured and trying to get steady
When Abraham Lincoln came back with a machete
But suddenly something caught his leg and he tripped
Indiana Jones took him out with his whip
Then he saw Godzilla sneaking up from behind
And he reached for his gun which he just couldn't find
'Cause Batman stole it and he shot and he missed
And Jackie Chan deflected it with his fist
Then he jumped in the air and he did a somersault
While Abraham Lincoln tried to pole vault
Onto Optimus Prime but they collided in the air
Then they both got hit by a Care Bear stare

It's a part of the original lyrics but it's missing everything past the second verse. Using the dev tools that came with my browser the lyrics are split across separate divs where beets grabs the first one fine but didn't realize that the other lyrics are in the other divs.

Setup

My configuration for plugins and lyrics is:

lyrics:
    bing_lang_from: []
    sources: '*'
    auto: yes
    bing_client_secret: REDACTED
    bing_lang_to:
    google_API_key: REDACTED
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    fallback:
    force: no
    local: no
    synced: no
    dist_thresh: 0.1
plugins:
- fetchart
- lastgenre
- embedart
- thumbnails
- duplicates
- missing
- lyrics
- mbsync
- spotify
- fromfilename
- mbcollection
- unimported
- inline
- convert
- info
- drop2beets
- orig_date
- edit
wisp3rwind commented 5 months ago

Duplicate of https://github.com/beetbox/beets/issues/4815