首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从r中的天才套餐中检索歌词

从r中的天才套餐中检索歌词
EN

Stack Overflow用户
提问于 2021-12-20 13:30:47
回答 1查看 26关注 0票数 0

我试图通过使用R中的“天才”包从特定歌曲中获得歌词,我使用了软件包中的功能:

代码语言:javascript
复制
kendrick <- gen_song_url("Kendrick Lamar","Humble")
genius_url(kendrick, info = "all")

从“肯德里克”中,我得到了天才网页上歌词的网址。但是,当我使用函数genius_url时,我会得到以下错误消息:

stream$next_ident()中的错误:期望in,在2>处得到

但我不明白。有人也有同样的问题吗?

EN

回答 1

Stack Overflow用户

发布于 2021-12-21 09:36:44

有人提出了一个问题,这里是https://github.com/JosiahParry/genius/issues/62

如果你需要歌词,你可以使用rvest

代码语言:javascript
复制
library(rvest)
library(dplyr)

kendrick %>% read_html() %>% 
  html_nodes('.Lyrics__Container-sc-1ynbvzw-6') %>% 
  html_text()

[1] "[Intro]Nobody pray for meIt been that day for meWay (Yeah, yeah)[Verse 1]Ayy, I remember syrup sandwiches and crime allowancesFinesse a nigga with some counterfeits, but now I'm countin’ thisParmesan where my accountant lives, in fact I'm downin' thisD’USSÉ with my boo bae tastes like Kool-Aid for the analystsGirl, I can buy your ass the world with my paystubOoh, that pussy good, won't you sit it on my taste blood
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70422586

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档