如何从Spotify蒸数据中过滤播客

发布于 2025-01-26 09:13:53 字数 751 浏览 2 评论 0原文

我最近通过他们为用户提供的“下载数据”选项提取了Spotify流媒体数据。我只是使用它在Python上玩耍,并与一些与数据分析相关的库,让我的朋友看到​​他们的流趋势,类似的内容,我想弄清楚是否有一种方法可以从数据中滤除播客。从理论上讲,这听起来很容易,但不幸的是数据非常有限。 Spotify以JSON文件的形式发送数据,每个条目只有4个属性。这是歌曲条目和播客条目的一个示例,可以显示我的意思:

{
"endTime" : "2021-01-21 00:36",
"artistName" : "Gojira",
"trackName" : "OROBORUS",
"msPlayed" : 321786
},
{
"endTime" : "2021-04-17 15:45",
"artistName" : "Androids & Aliens",
"trackName" : "Episode 40 - Baby, It's Mold Outside",
"msPlayed" : 1463731
}

因此,没有特别坚实的方法可以区分它们。我认为前进的最好方法是要么过滤漫长的流时间,要么以某种方式检查艺术家名称。流时间的问题是,我和许多我认识的人听诸如渐进金属之类的东西,其中一首歌可以超过20分钟,甚至有些曲目甚至达到了小时标记,因此很难绘制这条线。我调查了匹配的名称,但是我在Spotify上找不到任何形式的播客列表,尽管我确实发现其中有320万,所以这并不令人鼓舞。

因此,在这一点上,我有效地回到了绘图板,不确定要去哪里。还有其他人弄乱这些东西吗?如果是这样,我对任何想法都开放。谢谢

I recently pulled my Spotify streaming data through the "Download your data" option they give users. I'm just using it to play around in Python with some data analysis-related libraries, letting my friends see their streaming trends, things like that, and I want to figure out if there's a way to filter out podcasts from the data. In theory it sounds easy, but unfortunately the data is pretty limited. Spotify sends the data in the form of JSON files, and each entry only has 4 attributes. Here's an example of a song entry and a podcast entry to show what I mean:

{
"endTime" : "2021-01-21 00:36",
"artistName" : "Gojira",
"trackName" : "OROBORUS",
"msPlayed" : 321786
},
{
"endTime" : "2021-04-17 15:45",
"artistName" : "Androids & Aliens",
"trackName" : "Episode 40 - Baby, It's Mold Outside",
"msPlayed" : 1463731
}

So there's no particularly solid way to distinguish between them. I figured the best ways forward would be either filtering out long stream times or somehow checking the artist name. The issue with stream time is that I and many people I know listen to things like progressive metal where one song can run upwards of 20 minutes, and some tracks even reach the hour mark, so it would be very difficult to draw that line. I looked into the name matching, but I could not find any sort of list of podcasts on Spotify, though I did find out there are supposedly 3.2 million of them on there so that's not terribly encouraging.

So at this point I'm effectively back to the drawing board and not really sure where to go. Anyone else ever mess around with this stuff? If so, I'm open to any ideas. Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文