虾米高品质音乐接口:
http://www.xiami.com/song/gethqsong/sid/{songid}----------
3月5日前接口返回XML,可用凯撒矩阵得到url,现在返回二进制码了,大神们,如何从其得到url。
----------
下面的代码可以取得接口返回的二进制码:
1. 不用member_auth
curl -s -H 'Referer:
http://img.xiami.net/static/swf/seiya/player.swf?v=1394176529254' -H 'User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4,zh-TW;q=0.2'
http://www.xiami.com/song/gethqsong/sid/12. 用member_auth(需要vip账号)
curl -s -H 'Cookie: member_auth=' -H 'Referer:
http://img.xiami.net/static/swf/seiya/player.swf?v=1394176529254' -H 'User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4,zh-TW;q=0.2'
http://www.xiami.com/song/gethqsong/sid/1--------------
header中Referer是一定要的,不然返回404.