Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lyrics appear to contain a bit of garbage data? #237

Open
Gazoo101 opened this issue Apr 23, 2022 · 4 comments
Open

Lyrics appear to contain a bit of garbage data? #237

Gazoo101 opened this issue Apr 23, 2022 · 4 comments

Comments

@Gazoo101
Copy link

Gazoo101 commented Apr 23, 2022

Returned Lyrics contain some garbage data, I'd assume due to a change in formatting on https://genius.com 's webpage?

All lyrics (or at least the 7 I tested) appear to lead with the following:

"<song name> Lyrics", e.g. in the case of FreeBird, it'd be "FreeBird Lyrics"

and end with "<number>Embed" or "Embed" at the end.

I'd say these pieces aren't supposed to be part of the lyrics, yes?

Version info

  • Package version [3.0.1]
  • OS: ubuntu 18.04
@Acervans
Copy link

Acervans commented Sep 11, 2022

I've found the cause, in the lyrics() method in genius.py, the div that is searched is the one with class_=re.compile("^lyrics$|Lyrics__Root" however this also returns the number of "Pyongs" and the Embed button from the Lyrics_Footer div, the text content of which are included in Lyrics_Root.

EDIT: I've seen this solved in https://github.com/johnwmillr/LyricsGenius/pull/215#issuecomment-1083670536

@roaldandresen
Copy link

roaldandresen commented Jan 18, 2023

I've found the cause, in the lyrics() method in genius.py, the div that is searched is the one with class_=re.compile("^lyrics$|Lyrics__Root" however this also returns the number of "Pyongs" and the Embed button from the Lyrics_Footer div, the text content of which are included in Lyrics_Root.

EDIT: I've seen this solved in https://github.com/johnwmillr/LyricsGenius/pull/215#issuecomment-1083670536

Hi.
Your link seem to point to nowhere.
Do you have the fix for this bug?
I am bit too fresh with Python to start fiddling with the code myself.

@allerter
Copy link
Collaborator

The PR is available at #215
If you can't or don't know how to merge this PR with your own fork. Just add this

I've found the cause, in the lyrics() method in genius.py, the div that is searched is the one with class_=re.compile("^lyrics$|Lyrics__Root" however this also returns the number of "Pyongs" and the Embed button from the Lyrics_Footer div, the text content of which are included in Lyrics_Root.
EDIT: I've seen this solved in https://github.com/johnwmillr/LyricsGenius/pull/215#issuecomment-1083670536

Hi. Your link seem to point to nowhere. Do you have the fix for this bug? I am bit too fresh with Python to start fiddling with the code myself.

The PR is available at #215
Until that PR is merged and the library updated, you could fork the repository and merge this PR with your own fork.

@roaldandresen
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants