Soundcloud API - Pull Artist Name and Song Title Separately?

隐身守侯 提交于 2019-11-30 18:11:11

问题


Looking through the Soundcloud documentation - it doesn't appear that you can pull the artist name and the song name separately (or am I missing something?):

http://developers.soundcloud.com/docs/api/reference#playlists

ie: for song https://soundcloud.com/yaz-francis-1/pompeii-bastille

Artist: Bastille

Song: Pompeii

Is it just combined in the tracktitle (title)? User is also not always the song artist name, but the username of the person who posted it to soundcloud.

If not, is there anyway to pull Artist Name and Song separately?

Any help would be greatly appreciated - thanks!

Best,

JP


回答1:


Well the API doesn't give you the fields separately, but depending on your application there might be a way to get that data anyway. I have written a webapp using the Soundcloud API and I am actually extracting the artist name separately. If you're interested, I can tell you howI did it. You need to apply some NLP-tricks and use regular expressions.




回答2:


I'm in the process of building a Web app for a client who owns a record label and wants to publish 5000+ songs of varying artists and albums. I have diaected the api to death and found the best way to tie a track to an artist is by using tags. This way you can also search by the artist name and get results in the api. In my particular case I am using machine tags to store the artist, album and track name. I also store another tag as a key for finding only tracks that match that key so on my Web app I don't get tracks from other users, since you can't filter results by tags and genre when getting tracks from a specific user.

It's a but messy but it works. So something like this to get all songs by this artist on my Web app from a specific users account

/tracks.json?client_id=xxx&q=app:key=uniqueid&tags=app:artist=artist+name

You can also throw genre in there too if you wanted. Hope this was helpful



来源:https://stackoverflow.com/questions/22054970/soundcloud-api-pull-artist-name-and-song-title-separately

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!