最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Is there an alternative to the audio features function in Spotipy? - Stack Overflow

programmeradmin1浏览0评论

The function (audio-features) has been deprecated on the Spotify Web API. I need to be able to extract the 12 metrics Spotify uses such as (energy, danceability etc) and I am not sure how else to go about this since the feature is now gone.

I am using this feature to create a Song Recommendation system in Python using Spotipy for my A level coursework. If anyone can help, it would be really appreciated!

artist = "Metallica"
track = "Enter Sandman"

track_id = sp.search(q='artist:' + artist + ' track:' + track)['tracks']['items'][0]['id']
print(track_id)

track_features = sp.audio_analysis(track_id)[0]

print(track_features)
发布评论

评论列表(0)

  1. 暂无评论