johnwmillr / LyricsGenius

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

Movie Script returned instead of Lyrics #192

Closed jaidevshriram closed 3 years ago

jaidevshriram commented 3 years ago

Describe the bug Instead of returning a song, search_song returns a movie script/play.

Expected behavior The function should return a valid song.

To Reproduce Describe the steps required to reproduce the behavior.

  1. Run genius.search_song("Blue Jeans & A Boy's Shirt", "Glen Glenn")
  2. The Song item will have M Night Shyamalan as the Artist with a movie script in the lyrics.

The output can be seen here.

Version info

Additional context Sometimes I also get a list of songs instead of a song's lyrics. The above example was just one instance, there are more examples.

allerter commented 3 years ago

Before getting to the actual issue, please note that the lyrics for that song are missing on Genius and even if the package found the song successfully, it would return None. There are two reasons why this issue has occurred:

My suggestion is that if you find search_song to be unreliable, use the various search methods available and do the matching yourself. After all, search_song is merely a convenience method.