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 duplicate #291

Open
sega-gremlen opened this issue Jan 25, 2025 · 0 comments
Open

Lyrics duplicate #291

sega-gremlen opened this issue Jan 25, 2025 · 0 comments

Comments

@sega-gremlen
Copy link

sega-gremlen commented Jan 25, 2025

Describe the bug
Lyrics are being duplicated with different formats. The first format includes extra information such as contributors, translations, and embedded links, while the second format contains clean lyrics without any additional content. This issue was not present a week ago, but now it occurs consistently when searching for songs.

Expected behavior
I expect only one version of the lyrics (the clean version, without extra information).

To Reproduce
Create a new clean project with only the lyricsgenius package installed via pip.

Use the following code to search for a song:

from lyricsgenius import Genius


genius_client = Genius('*token*')
genius_client.verbose = False
song = genius_client.search_song('dua lipa', 'new rules', False, False)
print(song.lyrics)

Output:

225 ContributorsTranslationsEspañolPortuguêsItalianoDeutschNederlandsРусскийУкраїнськаالعربيةNew Rules Lyrics[Intro]
One

[Verse 1]
Talkin' in my sleep at night, makin' myself crazy
(Out of my mind, out of my mind)
Wrote it down and read it out, hopin' it would save me
(Too many times, too many times)

[Refrain]
My love
He makes me feel like nobody else, nobody else
But my love
He doesn't love me, so I tell myself, I tell myself

[Pre-Chorus]
One, don't pick up the phone
You know he's only callin' 'cause he's drunk and alone
Two, don't let him in
You'll have to kick him out again
Three, don't be his friend
You know you're gonna wake up in his bed in the mornin'
And if you're under him, you ain't gettin' over him

[Chorus]
I got new rules, I count 'em
I got new rules, I count 'em
I gotta tell them to myself
I got new rules, I count 'em
I gotta tell them to myself
See Dua Lipa LiveGet tickets as low as $68You might also like[Verse 2]
I keep pushin' forwards, but he keeps pullin' me backwards
(Nowhere to turn, no way, nowhere to turn, no)
Now I'm standin' back from it, I finally see the pattern
(I never learn, I never learn)

[Refrain]
But my love
He doesn't love me, so I tell myself, I tell myself
I do, I do, I do

[Pre-Chorus]
One, don't pick up the phone
You know he's only callin' 'cause he's drunk and alone
Two, don't let him in
You'll have to kick him out again
Three, don't be his friend
You know you're gonna wake up in his bed in the mornin'
And if you're under him, you ain't gettin' over him

[Chorus]
I got new rules, I count 'em
I got new rules, I count 'em
I gotta tell them to myself
I got new rules, I count 'em
I gotta tell them to myself
[Bridge]
Practice makes perfect
I'm still tryna learn it by heart (I got new rules, I count 'em)
Eat, sleep, and breathe it
Rehearse and repeat it 'cause I (I got new, I got new)

[Pre-Chorus]
One, don't pick up the phone (Yeah)
You know he's only callin' 'cause he's drunk and alone (Alone)
Two, don't let him in (Oh-ooh)
You'll have to kick him out again (Again)
Three, don't be his friend
You know you're gonna wake up in his bed in the mornin'
And if you're under him, you ain't gettin' over him

[Chorus]
I got new rules, I count 'em
I got new rules, I count 'em (Woah, oh)
I gotta tell them to myself
I got new rules, I count 'em (Baby, you know I count 'em)
I gotta tell them to myself

[Outro]
Don't let him in, don't let him in
Don't, don't, don't, don't
Don't be his friend, don't be his friend
Don't, don't, don't, don't
Don't let him in, don't let him in
Don't, don't, don't, don't
Don't be his friend, don't be his friend
Don't, don't, don't, don't
You're gettin' over him197Embed
[Intro]
One

[Verse 1]
Talkin' in my sleep at night, makin' myself crazy
(Out of my mind, out of my mind)
Wrote it down and read it out, hopin' it would save me
(Too many times, too many times)

[Refrain]
My love
He makes me feel like nobody else, nobody else
But my love
He doesn't love me, so I tell myself, I tell myself

[Pre-Chorus]
One, don't pick up the phone
You know he's only callin' 'cause he's drunk and alone
Two, don't let him in
You'll have to kick him out again
Three, don't be his friend
You know you're gonna wake up in his bed in the mornin'
And if you're under him, you ain't gettin' over him

[Chorus]
I got new rules, I count 'em
I got new rules, I count 'em
I gotta tell them to myself
I got new rules, I count 'em
I gotta tell them to myself

[Verse 2]
I keep pushin' forwards, but he keeps pullin' me backwards
(Nowhere to turn, no way, nowhere to turn, no)
Now I'm standin' back from it, I finally see the pattern
(I never learn, I never learn)

[Refrain]
But my love
He doesn't love me, so I tell myself, I tell myself
I do, I do, I do

[Pre-Chorus]
One, don't pick up the phone
You know he's only callin' 'cause he's drunk and alone
Two, don't let him in
You'll have to kick him out again
Three, don't be his friend
You know you're gonna wake up in his bed in the mornin'
And if you're under him, you ain't gettin' over him

[Chorus]
I got new rules, I count 'em
I got new rules, I count 'em
I gotta tell them to myself
I got new rules, I count 'em
I gotta tell them to myself

[Bridge]
Practice makes perfect
I'm still tryna learn it by heart (I got new rules, I count 'em)
Eat, sleep, and breathe it
Rehearse and repeat it 'cause I (I got new, I got new)

[Pre-Chorus]
One, don't pick up the phone (Yeah)
You know he's only callin' 'cause he's drunk and alone (Alone)
Two, don't let him in (Oh-ooh)
You'll have to kick him out again (Again)
Three, don't be his friend
You know you're gonna wake up in his bed in the mornin'
And if you're under him, you ain't gettin' over him

[Chorus]
I got new rules, I count 'em
I got new rules, I count 'em (Woah, oh)
I gotta tell them to myself
I got new rules, I count 'em (Baby, you know I count 'em)
I gotta tell them to myself

[Outro]
Don't let him in, don't let him in
Don't, don't, don't, don't
Don't be his friend, don't be his friend
Don't, don't, don't, don't
Don't let him in, don't let him in
Don't, don't, don't, don't
Don't be his friend, don't be his friend
Don't, don't, don't, don't
You're gettin' over him

Version info

  • Package version 3.2.0
  • OS: Windows

Additional context
This issue started occurring recently. 21.01.2025 the API worked as expected, returning only the clean lyrics without duplicates.

*** update ***
Adding index divs[1:] in "def lyrics" function works fine for me

lyrics = "\n".join([div.get_text() for div in divs[1:]])

around 155 string in genius.py

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

1 participant