在从SoundCloud多音轨抓取统计 [英] Fetching stats on multiple tracks from soundcloud

查看:260
本文介绍了在从SoundCloud多音轨抓取统计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望得到所有曲目以0比1剧本,我期待从的 http://api.soundcloud.com/tracks/90891876.json?client_id=XXX URL,其​​中playback_count包括在JSON响应。我们有差不多1500的声音片段,这可能使该获取这些数据〜1500倍液或将我得到节流为垃圾邮件的API连接的脚本?我们只会用这个统计几次来衡量我们的运动是怎么回事试图增加戏剧。或者是有可能在短短的一个请求来获取这些数据?

I want to get all tracks with 0 to 1 plays and am looking at the playback_count stats from http://api.soundcloud.com/tracks/90891876.json?client_id=XXX URL, where playback_count is included in the json response. We have almost 1500 sound snippets, is it possible to make a script that fetches this data ~1500 times or will I get throttled for spamming the connection to the API? We will only use this stats a couple of times to measure how our campaign is going trying to increase plays. Or is it possible to get this data in just one request?

推荐答案

我看到了这个问题,刚刚赢得了风滚草的徽章,我觉得不好。

I saw this question just earned the "Tumbleweed" badge and I felt bad.

如果曲目都是由同一个用户拥有的,你可以使用这个端点:

If the tracks are all owned by the same user, you can use this endpoint:

http://api.soundcloud.com/users/{id}/tracks

如果你只是有曲目列表,你可以使用这个端点:

If you just have a list of tracks, you can use this endpoint:

http://api.soundcloud.com/tracks?ids=123,234,765,456,etc

在这里看到的文档的过滤器部分: HTTP://developers.soundcloud .COM /文档/ API /参考#曲目

但请记住,虽然HTTP规范不会对查询字符串的长度加以限制,则默认的Apache设置将某处返回一个错误约4000字。这可能是该端点大约400轨道。玩它。也许的SoundCloud对每个查询的磁道数的限制。

But keep in mind that although the HTTP spec does not impose a limit on the length of the querystring, the default apache settings will return an error somewhere around 4000 characters. That's probably around 400 tracks for this endpoint. Play around with it. Maybe soundcloud has a limit on the number of tracks per query.

这篇关于在从SoundCloud多音轨抓取统计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆