johnwmillr / LyricsGenius

Download song lyrics and metadata from Genius.com 🎶🎤
http://www.johnwmillr.com/scraping-genius-lyrics/
MIT License
898 stars 159 forks source link

Error Message: Specified song does not have a valid URL with lyrics. Rejecting. #114

Closed ZeyPit closed 4 years ago

ZeyPit commented 4 years ago

Hi, John.

I'm trying to collect a corpus from lyrics of artists from a variety of genres.

I have one specific problem though. When I'm searching for any song with the code below:

song = g.search_song('Work', artist='Rihanna')

I'm getting this error: Specified song does not have a valid URL with lyrics. Rejecting. Has this happened before? Any solutions?

Version info

johnwmillr commented 4 years ago

Hi @ZeyPit, do you still get this error when using the latest version of the package (1.8.1)? I am unable to reproduce this error.

John

ZeyPit commented 4 years ago

The error stopped occuring for no specific reason after a couple of days. Now it's working fine :)

johnwmillr commented 4 years ago

Great! Glad it’s working for you.

ABSanthosh commented 4 years ago

Hi, So the problem is that the api works fine some times and gives this issue randomly.

genius = lyricsgenius.Genius("")

song = genius.search_song("Earth", "Lil Dicky") lyric_list = (song.lyrics)

I was able to get lyrics but after some time, it stops working and give this error:

Searching for "Earth" by Lil Dicky... Specified song does not have a valid URL with lyrics. Rejecting. Traceback (most recent call last): File "C:\Users\absan\Desktop\Python\2020 Projects\Project-Lypic\lypic1.py", line 23, in lyric_list = (song.lyrics.replace("Chorus:","")).split() AttributeError: 'NoneType' object has no attribute 'lyrics'