You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is a bug where if a desired Artist is queried and they were/are part of a more well known musical act the package will change the artist name to the more well known act.
The search return the top 10 most popular songs for the artist "Swae Lee".
To Reproduce
As implied above
Create a Genius object
Run search_artist('Swae Lee') with the Genius object
You should get output
Searching for songs by Swae Lee...
Changing artist name to 'Rae Sremmurd'
Song 1: "Black Beatles"
Song 2: ...
Version info
Package version lyricsgenius-1.7.0
OS: Windows 10, but using WSL Ubuntu 18.04
Additional context
This behavior seems to be happening because in _get_time_from_search_response() in api.py, if the first result is the correct "type", then it is automatically returned. I suspect, in this particular case, Genius is returning the artist "Rae Sremmurd" first because I guess Swae Lee isn't as well known for his solo stuff.
Proposed solution
I think a way to fix this is to not return the top hit, but instead check all the hits for type and to see if the 'id' matches the artist_name. It will mean a performance hit, but seeing as the precedent is set by #32, speed doesn't seem to be the biggest focus of this package.
I am willing to work on this and open a PR if you are ok with it
The text was updated successfully, but these errors were encountered:
Describe the bug
There is a bug where if a desired Artist is queried and they were/are part of a more well known musical act the package will change the artist name to the more well known act.
Expected behavior
When running
The search return the top 10 most popular songs for the artist "Swae Lee".
To Reproduce
As implied above
search_artist('Swae Lee')
with the Genius objectYou should get output
Version info
lyricsgenius-1.7.0
Additional context
This behavior seems to be happening because in
_get_time_from_search_response()
inapi.py
, if the first result is the correct "type", then it is automatically returned. I suspect, in this particular case, Genius is returning the artist "Rae Sremmurd" first because I guess Swae Lee isn't as well known for his solo stuff.Proposed solution
I think a way to fix this is to not return the top hit, but instead check all the hits for type and to see if the 'id' matches the
artist_name
. It will mean a performance hit, but seeing as the precedent is set by #32, speed doesn't seem to be the biggest focus of this package.I am willing to work on this and open a PR if you are ok with it
The text was updated successfully, but these errors were encountered: