ewenme / geniusr

work with data & lyrics from Genius
https://ewenme.github.io/geniusr/
Other
50 stars 12 forks source link

Update lyrics.R to handle instrumental songs #8

Closed johnbville closed 5 years ago

johnbville commented 5 years ago

This is an awesome package that makes it super easy to scrape data from genius.com! Thank you for your good work here. I ran into some trouble using it to get information from songs without lyrics, so I have a minor suggestion.

Previously, scrape_lyrics_url() would throw an error when it encountered an instrumental song. This checks to see if there are no lyrics left after removing items in square brackets, and if so, creates a single item with an NA value so that it can be converted to a tibble. This change resolved the error I was having with instrumental songs.

Thank you again! -John

ewenme commented 5 years ago

Glad you're enjoying it John, and thanks for this contribution! Good luck w/ the instrumental digging...