ewenme / geniusr

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

for-loop for multiple lyrics fails #2

Closed mrmvergeer closed 5 years ago

mrmvergeer commented 6 years ago

Hi, I want to collect multiple lyrics using a for loop:

N <- 8
df.ids <- paste("Runs", N, sep="")
for (i in 1:N) {
  d.frame <- try(genius_lyrics(artist = A[i], song = B[i]))
  assign(df.ids[i], d.frame)
}

It works fine for a single record, but when I want to collect multiple lyrics I get the following error:

Error in read_xml.response(x$response, ..., as_html = as_html) : Not Found (HTTP 404). In addition: Warning message: In request_GET(session, url) : Not Found (HTTP 404). Error : Column index must be at most 1 if positive, not 2 Error : Column index must be at most 1 if positive, not 3 Error : Column index must be at most 1 if positive, not 4 Error : Column index must be at most 1 if positive, not 5 Error : Column index must be at most 1 if positive, not 6 Error : Column index must be at most 1 if positive, not 7 Error : Column index must be at most 1 if positive, not 8

Any idea how to solve this? Thanks! Maurice

ewenme commented 5 years ago

Hi Maurice, genius_lyrics() is not a function in this package. It is a function in the geniusR package, where you should file any issues with it. Thanks!