使用 Spotipy python 库抓取 'deep' 音频特征

Scrape 'deep' audio features using Spotipy python library

在过去的几天里,我一直在为 Spotify Web API 使用出色的 Spotipy python 库。然而,在导航访问基本信息(track/artist/album 名称、url、uris 等)之后,我现在正试图找到一些更深入的曲目特征(BPM、速度等)。

我知道 Spotify 公开了这些信息,因为 some enterprising services 已经将这些信息整合到他们的产品中。我的问题是,是否有任何方法可以通过 spotipy.Spotify() 对象访问此类信息,或者在最新的 spotipy 版本 (v2.3.8) 中根本无法访问此类信息?

如有任何帮助,我们将不胜感激!

link 不是一个有进取心的服务,它是 Spotify Web API.

的 Echo nest 部分示例的一部分

https://developer.spotify.com/web-api/code-examples/#echo-nest-example-apps https://github.com/plamere/SortYourMusic

可能令人困惑的是轨道对象上的属性不可用,但您需要调用一个名为 audio_features 的新方法。

https://developer.spotify.com/web-api/get-several-audio-features/ http://spotipy.readthedocs.io/en/latest/#spotipy.client.Spotify.audio_features

这对我有用:

import spotipy
import spotipy.oauth2

credentials = spotipy.oauth2.SpotifyClientCredentials()
spotify = spotipy.Spotify(client_credentials_manager=credentials)
print spotify.audio_features(['4uLU6hMCjMI75M1A2tKUQC'])