question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lyrics: Avoid scraping non-lyrics from the Genius backend

See original GitHub issue

Is there any practical way to debug the lyrics plugin?

I’m seen an unusual behavior with a particular release, I don’t know if it is more wide-spread or not, trying to dig into it to find out.

I have the lyrics plugin enabled in my beets configuration, with all the default lyrics plugin settings.

I’m importing Queer (Remixes) by release ID. All of the other tags look correct, but the lyrics tag ends up capturing the track listing of another Garbage release these tracks happen to appear on.

I’ve tried manually searching the various lyrics search engines that the documentation indicates beets relies on. Two of them return the correct lyrics, the rest have no match, none of them have the below content.

Manually using the lyrics plugin also reproduces the issue.

What would sensible next steps be to debug this?

$ beet lyrics Garbage Queer Danny Saber mix -f -p
lyrics: fetched lyrics: Garbage - Queer - Queer (Danny Saber mix)
Album Art Tracklist Disc 1: Album + B-sides

01. "Supervixen"
02. "Queer"
03. "Only Happy When It Rains"
04. "As Heaven Is Wide"
05. "Not My Idea"
06. "A Stroke Of Luck"
07. "Vow"
08. "Stupid Girl"
09. "Dog New Tricks"
10. "My Lover's Box"
11. "Fix Me Now"
12. "Milk"
13. "Subhuman"
14. "Girl Don't Come"
15. "Sleep"
16 "Driving Lesson"
17 "Trip My Wire"
18 "#1 Crush" (Nellee Hooper Mix)
19 "Butterfly Collector"
20. "Alien Sex Fiend"
21. "Kick My Ass"

Disc 2: "Stupid Girl" + "Queer" remixes

01 "Stupid Girl" (Danny Saber Remix)
02 "Stupid Girl" (Rabbit In The Moon - Future Retro Mix)
03 "Stupid Girl" (Jason Bentley & Bruno Guez Shoegazer Mix)
04 "Stupid Girl" (Dreadzone Vocal Mix)
05 "Stupid Girl" (Dreadzone Dub Version)
06 "Stupid Girl" (Red Snapper Mix)
07 "Stupid Girl" (Todd Terry Tee's Radio Mix)
08 "Stupid Girl" (Todd Terry Tee's Freeze Club)
09 "Stupid Girl" (Todd Terry Tee's In-House Dub)
10 "Stupid Girl" (Todd Terry's Bonus Beats)
11 "Queer" (Danny Saber Alt Vox Mix)
12 "Queer" (Rabbit In The Moon Hefty Bag Mix)
13 "Queer" (Rabbit In The Moon F.T.O.I. AKA Dub Mix)
14 "Queer" (Adrian Sherwood The Very Queer Dub Bin Mix)
15 "Queer" (Martin Gore & Paul Freegard The Most Beautiful Woman in Town Mix)

Disc 3: "Milk" + extra remixes

01. "Milk" (Siren Mix)
02. "Milk" (The Wicked Mix) [feat. Tricky]
03. "Milk" (Goldie Completely Trashed Mix)
04. "Milk" (Rabbit In The Moon Tricky Mix) [feat. Tricky]
05. "Milk" (Rabbit In The Moon Got It Mix)
06. "Milk" (Rabbit In The Moon Butchered Vegas Mix)
07. "Milk" (Rabbit In The Moon Udder Edit)
08. "Milk" (Goldie VIP Rufige Trash Your Shit Mix)
09. "Milk" (Massive Attack Trance Mix)
10. "Milk" (Massive Attack Classic Mix)
11. "Milk" (Massive Attack Primal Mix)
12. "Milk" (Massive Attack Ultra Classic Mix)
13. "Milk" (Massive Attack D Mix)
14. "Dog New Tricks" (The Pal Mix)
15. "#1 Crush" (Original Mix)

Disc 4: Alternative versions

01. "Vow" (Joan of Ark Mix)
02. "Vow" (Stripped Down Mix)
03. "Vow" (Tuesday Night Club Mix)
04. "Fix Me Now" (Alternate Subbass Mix)
05. "Subhuman" (Supersize Mix)
06. "#1 Crush" (Early Demo Mix)
07. "A Stroke of Luck" (Early Demo Mix)
08. "My Lover's Box" (Early Demo Mix)
09. "Not My Idea" (Early Demo Mix)
10. "Only Happy When It Rains" (Early Demo Mix)
11. "Supervixen" (Early Demo Mix)
lyrics: fetched lyrics: Garbage - Queer (Remixes) - Queer (Danny Saber mix)
Album Art Tracklist Disc 1: Album + B-sides

01. "Supervixen"
02. "Queer"
03. "Only Happy When It Rains"
04. "As Heaven Is Wide"
05. "Not My Idea"
06. "A Stroke Of Luck"
07. "Vow"
08. "Stupid Girl"
09. "Dog New Tricks"
10. "My Lover's Box"
11. "Fix Me Now"
12. "Milk"
13. "Subhuman"
14. "Girl Don't Come"
15. "Sleep"
16 "Driving Lesson"
17 "Trip My Wire"
18 "#1 Crush" (Nellee Hooper Mix)
19 "Butterfly Collector"
20. "Alien Sex Fiend"
21. "Kick My Ass"

Disc 2: "Stupid Girl" + "Queer" remixes

01 "Stupid Girl" (Danny Saber Remix)
02 "Stupid Girl" (Rabbit In The Moon - Future Retro Mix)
03 "Stupid Girl" (Jason Bentley & Bruno Guez Shoegazer Mix)
04 "Stupid Girl" (Dreadzone Vocal Mix)
05 "Stupid Girl" (Dreadzone Dub Version)
06 "Stupid Girl" (Red Snapper Mix)
07 "Stupid Girl" (Todd Terry Tee's Radio Mix)
08 "Stupid Girl" (Todd Terry Tee's Freeze Club)
09 "Stupid Girl" (Todd Terry Tee's In-House Dub)
10 "Stupid Girl" (Todd Terry's Bonus Beats)
11 "Queer" (Danny Saber Alt Vox Mix)
12 "Queer" (Rabbit In The Moon Hefty Bag Mix)
13 "Queer" (Rabbit In The Moon F.T.O.I. AKA Dub Mix)
14 "Queer" (Adrian Sherwood The Very Queer Dub Bin Mix)
15 "Queer" (Martin Gore & Paul Freegard The Most Beautiful Woman in Town Mix)

Disc 3: "Milk" + extra remixes

01. "Milk" (Siren Mix)
02. "Milk" (The Wicked Mix) [feat. Tricky]
03. "Milk" (Goldie Completely Trashed Mix)
04. "Milk" (Rabbit In The Moon Tricky Mix) [feat. Tricky]
05. "Milk" (Rabbit In The Moon Got It Mix)
06. "Milk" (Rabbit In The Moon Butchered Vegas Mix)
07. "Milk" (Rabbit In The Moon Udder Edit)
08. "Milk" (Goldie VIP Rufige Trash Your Shit Mix)
09. "Milk" (Massive Attack Trance Mix)
10. "Milk" (Massive Attack Classic Mix)
11. "Milk" (Massive Attack Primal Mix)
12. "Milk" (Massive Attack Ultra Classic Mix)
13. "Milk" (Massive Attack D Mix)
14. "Dog New Tricks" (The Pal Mix)
15. "#1 Crush" (Original Mix)

Disc 4: Alternative versions

01. "Vow" (Joan of Ark Mix)
02. "Vow" (Stripped Down Mix)
03. "Vow" (Tuesday Night Club Mix)
04. "Fix Me Now" (Alternate Subbass Mix)
05. "Subhuman" (Supersize Mix)
06. "#1 Crush" (Early Demo Mix)
07. "A Stroke of Luck" (Early Demo Mix)
08. "My Lover's Box" (Early Demo Mix)
09. "Not My Idea" (Early Demo Mix)
10. "Only Happy When It Rains" (Early Demo Mix)
11. "Supervixen" (Early Demo Mix)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
wisp3rwindcommented, Jul 4, 2021

Actually, the issue appears to be different: Genius used to use song pages with “Tracklist + album art” in the title, which is now deprecated, https://genius.com/Genius-how-to-annotate-artwork-on-genius-annotated,

Additionally, NEVER create a [Tracklist + Album Art] page.

but old pages like this are still around. We should filter such results.

I came across another example. (Output truncated for sanity.)

$ beet lyrics -f -p Clint Eastwood Ed Case Refix edit
lyrics: fetched lyrics: Gorillaz - Clint Eastwood - Clint Eastwood (Ed Case Refix edit)
1. "Tomorrow Comes Today"
2. "Clint Eastwood" (featuring Del the Funky Homosapien)
3. "19-2000"
4. "Rock the House" (featuring Del the Funky Homosapien)
5. "Feel Good Inc." (single edit) (featuring De La Soul)
...

This looks a little different, but the website for this specific song seems to be deleted now, so I can’t really check.

1reaction
wisp3rwindcommented, Apr 11, 2021

The -vv argument gave me the info I need. Looks like Genius is the culprit. (I thought I tried a manual search there earlier, but I guess I missed it.)

Interesting that it is searching Genius even though the documentation suggests Genius is not in the default list.

So is the content on Genius wrong, or is beets reading from it incorrectly? The Genius UI is pretty awful so it’s hard to tell what the raw data might look like. It appears that when I search for the individual track it re-routes me to a page with release details, not a track lyrics page.

Looks like the Genius plugin needs something like the bad_triggers mechanism that’s implemented in the Google backend:

https://github.com/beetbox/beets/blob/2fa2d1b4eeb7a2917ce6df097f9413deeafb27f9/beetsplug/lyrics.py#L558-L568

Read more comments on GitHub >

github_iconTop Results From Across the Web

RiskTakerLeek – Backends Lyrics - Genius
Backends Lyrics : (Ayy, let that shit ride, Tav) / Ayy, I let it ride like Tavy ... with this gang (Let's go),...
Read more >
Google Lyric-Scraping Fight With Genius Primed for Supreme ...
Genius sued Google in 2019, accusing the tech giant of scraping lyrics from Genius' website and republishing them at the top of Google's...
Read more >
Changelog — beets 1.6.0 documentation - Read the Docs
Lyrics Plugin: Avoid fetching truncated lyrics from the Google backed by merging text blocks separated by empty <div> tags before scraping.
Read more >
Untitled
Mila j hot box instrumental, Alberta environment water data system! ... Rap phenomenon 2 lyrics, Avoid bad breath with braces, Campus life cheats...
Read more >
The 150 Best Albums of the 1990s - Pitchfork
(Listening to the song now, with its gentle lyrics about ... It is for good reason that Russell is now an avatar of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found