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

Add an item song.album #210

Open
Mat314159 opened this issue Jun 3, 2021 · 1 comment
Open

Add an item song.album #210

Mat314159 opened this issue Jun 3, 2021 · 1 comment

Comments

@Mat314159
Copy link

Hello,
Thank you very much for your project ! I use it to download the lyrics of rap songs, and I coded a little program in python to organize te lyrics in folders (artist > album > all songs).
I would like to access to the album name from a song. I think it was available in previous version. Can you explain me how to use a previous version, or better, add an item song.album ?
Thank you for your help !
Matteo

@allerter
Copy link
Collaborator

allerter commented Jun 4, 2021

The song.album attribute will be added back in the future. Nevertheless, you can always access what Genius sends in the response if you access the response dict. For example:

song = genius.search_song("Rap God", "Eminem", get_full_info=True)
song_dict = song.to_dict()
print(song_dict.keys())
print(song_dict["album"])

This is how you would get the album, but right now there is a bug that makes get_full_info become False and album won't be available. You can either clone #181 and use that or use any version below 3.0.0. If you want to use an earlier version:

pip uninstall lyricsgenius
pip install lyricsgenius==2.0.2

Note that only the latest version is supported and bugs in earlier versions won't be fixed.

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

2 participants