我创建了一个数据集,其中包含披头士乐队的所有原创歌曲。我想使用genius
包获取所有歌曲的歌词。我使用以下代码获取歌词但抛出错误。
map(beatles_songs$song, ~ genius_lyrics("The Beatles", ., "simple"))
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).
我想这可能是因为列表中的歌曲名称与genius.com中的歌曲不匹配,但我不知道如何检查。那么我应该怎么做才能同时获取所有歌曲的歌词呢?