网易云音乐API分析1. 总览本文档是通过对网易云音乐Android客户端(1.5.2)的部分功能进行分析得出的在所有的交互中,均需要在cookie中添加这对键值appver=1.5.2;(Update 2014-07-13) cookie中添加appver=2.0.2 referer设置为http://music.163.com
2. 搜索POST http://music.163.com/api/search/get/参数s: 搜索词limit: 返回数量sub: 意义不明(非必须参数);取值:falsetype: 搜索类型;取值意义1 单曲
10 专辑
100 歌手
1000 歌单
1002 用户
offset: 偏移数量,用于分页MUSIC_U: 意义不明(非必须参数)示例curl -d "s=玫瑰色的你&limit=20&type=1&offset=0" -b "appver=1.5.2;" http://music.163.com/api/search/get/结果:{"code": 200, "result": {"songCount": 1, "songs": [{"album": {"status": 1, "copyrightId": 0, "name": "\u795e\u7684\u6e38\u620f", "artist": {"alias": [], "picUrl": null, "id": 0, "name": ""}, "publishTime": 1344528000000, "id": 32311, "size": 10}, "status": 1, "copyrightId": 0, "name": "\u73ab\u7470\u8272\u7684\u4f60", "mvid": 5102, "alias": [], "artists": [{"alias": [], "picUrl": null, "id": 10557, "name": "\u5f20\u60ac"}], "duration": 297927, "id": 326695}]}
}
3. 获取歌手专辑列表GET http://music.163.com/api/artist/albums/[artist_id]/其中artist_id用歌手id替换参数offset: 偏移数量,用于分页limit: 返回数量示例curl -b "appver=1.5.2;" "http://music.163.com/api/artist/albums/10557?offset=0&limit=3"结果:{"hotAlbums": [{"status": 1, "blurPicUrl": "http://p2.music.126.net/mic-HzsY8tNY6DD1eHzdlg==/612427976714915.jpg", "commentThreadId": "R_AL_3_2263047", "description": "", "tags": "", "briefDesc": "", "artist": {"img1v1Url": "http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg", "name": "\u5f20\u60ac", "briefDesc": "", "albumSize": 8, "img1v1Id": 0, "alias": ["\u7126\u5b89\u6ea5"], "picId": 168225279065170, "picUrl": "http://p1.music.126.net/F7i_-eBbuhpBXodY5U2oTw==/168225279065170.jpg", "id": 10557}, "companyId": 0, "publishTime": 1349366400007, "name": "\u795e\u7684\u6e38\u620f \u5de1\u6f14\u7cbe\u534e\u5b9e\u5f55", "alias": [], "picId": 612427976714915, "copyrightId": 0, "picUrl": "http://p1.music.126.net/mic-HzsY8tNY6DD1eHzdlg==/612427976714915.jpg", "company": "\u7d22\u5c3c\u97f3\u4e50", "songs": null, "type": null, "id": 2263047, "size": 7}, ...], "more": true, "code": 200, "artist": {"img1v1Url": "http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg", "name": "\u5f20\u60ac", "briefDesc": "", "albumSize": 8, "img1v1Id": 0, "alias": ["\u7126\u5b89\u6ea5"], "picId": 168225279065170, "picUrl": "http://p1.music.126.net/F7i_-eBbuhpBXodY5U2oTw==/168225279065170.jpg", "id": 10557}
}
4. 获取专辑音乐列表GET http://music.163.com/api/album/[album_id]/其中album_id用专辑id替换示例curl -b "appver=1.5.2;" "http://music.163.com/api/album/32311/"结果:{"album": {"alias": ["Games We Play"],"artist": {"albumSize": 8,"alias": ["\u7126\u5b89\u6ea5"],"briefDesc": "","id": 10557,"img1v1Id": 0,"img1v1Url": "http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","name": "\u5f20\u60ac","picId": 168225279065170,"picUrl": "http://p1.music.126.net/F7i_-eBbuhpBXodY5U2oTw==/168225279065170.jpg"},"blurPicUrl": "http://p1.music.126.net/cdoUJ2yO5LRuJhGeIsRdjQ==/46179488380332.jpg","briefDesc": "","commentThreadId": "R_AL_3_32311","company": "\u7d22\u5c3c\u97f3\u4e50\u5a31\u4e50","companyId": 0,"copyrightId": 0,"description": "2012...\n\n","id": 32311,"info": {"commentCount": 1,"comments": null,"latestLikedUsers": null,"liked": false,"likedCount": 0,"shareCount": 2,"threadId": "R_AL_3_32311"},"name": "\u795e\u7684\u6e38\u620f","picId": 46179488380332,"picUrl": "http://p1.music.126.net/cdoUJ2yO5LRuJhGeIsRdjQ==/46179488380332.jpg","publishTime": 1344528000000,"size": 10,"songs": [{"album": {"alias": ["Games We Play"],"artist": {"albumSize": 0,"alias": [],"briefDesc": "","id": 0,"img1v1Id": 0,"img1v1Url": "http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","name": "","picId": 0,"picUrl": ""},"blurPicUrl": "http://p1.music.126.net/cdoUJ2yO5LRuJhGeIsRdjQ==/46179488380332.jpg","briefDesc": "","commentThreadId": "R_AL_3_32311","company": "\u7d22\u5c3c\u97f3\u4e50\u5a31\u4e50","companyId": 0,"copyrightId": 0,"description": "","id": 32311,"name": "\u795e\u7684\u6e38\u620f","picId": 46179488380332,"picUrl": "http://p1.music.126.net/cdoUJ2yO5LRuJhGeIsRdjQ==/46179488380332.jpg","publishTime": 1344528000000,"size": 10,"songs": null,"status": 1,"tags": "","type": ""},"alias": [],"artists": [{"albumSize": 0,"alias": [],"briefDesc": "","id": 10557,"img1v1Id": 0,"img1v1Url": "http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","name": "\u5f20\u60ac","picId": 0,"picUrl": ""}],"bMusic": {"bitrate": 320000,"dfsId": 1012650209189891,"id": 10334056,"name": "\u73ab\u7470\u8272\u7684\u4f60","playTime": 297927,"size": 11930240},"commentThreadId": "R_SO_4_326695","copyrightId": 0,"dayPlays": 0,"duration": 297927,"hMusic": {"bitrate": 320000,"dfsId": 1012650209189888,"id": 10334053,"name": "\u73ab\u7470\u8272\u7684\u4f60","playTime": 297927,"size": 11930240},"hearTime": 0,"id": 326695,"lMusic": {"bitrate": 96000,"dfsId": 1012650209189890,"id": 10334055,"name": "\u73ab\u7470\u8272\u7684\u4f60","playTime": 297927,"size": 3595194},"mMusic": {"bitrate": 160000,"dfsId": 1012650209189889,"id": 10334054,"name": "\u73ab\u7470\u8272\u7684\u4f60","playTime": 297927,"size": 5976935},"mp3Url": "http://m1.music.126.net/uCNvR9xHLoQIj1kIRyzadQ==/1012650209189889.mp3","mvid": 5102,"name": "\u73ab\u7470\u8272\u7684\u4f60","playedNum": 0,"popularity": 95.0,"position": 1,"score": 95,"starred": false,"starredNum": 0,"status": 1},...],"status": 1,"tags": "","type": ""},"code": 200
}
5. 下载音乐文件GET http://m1.music.126.net/[encrypted_song_id]/[song_dfsId].mp3其中song_dfsId为歌曲id,同一歌曲不同比特率有不同的id,见上结果。encrypted_song_id为song_dfsId加密后的字符串。歌曲id加密代码import md5def encrypted_id(id):byte1 = bytearray('3go8&$8*3*3h0k(2)2')byte2 = bytearray(id)byte1_len = len(byte1)for i in xrange(len(byte2)):byte2[i] = byte2[i]^byte1[i%byte1_len]m = md5.new()m.update(byte2)result = m.digest().encode('base64')[:-1]result = result.replace('/', '_')result = result.replace('+', '-')return result

小谈网易云音乐----API相关推荐

  1. 网易云音乐API调用(持续跟新中)

    ** 最近两天在学习一下微信小程序,在学习网络请求的部分了解了一下网易云音乐api的使用,下面给大家分享一下. ** 调用方法: https://api.imjad.cn/cloudmusic/ 在以 ...

  2. 网易云音乐api歌单数据获取

    网易云音乐api歌单数据获取 网易作为IT大厂,数据可以说 藏的很严实,普通按个f12以为能搞到点东西,结果,看不到要的歌单信息,这可是愁死我了啊. 后来看了看知乎,一帮怪才集中的地方果然迸发了思维的 ...

  3. 网易云音乐API使用

    网易云音乐API使用 网易云音乐API 1.安装 $ git clone git@github.com:Binaryify/NeteaseCloudMusicApi.git 或者 https://gi ...

  4. 网易云音乐API,的调用方法 ,vue项目中(在本地使用)

    1. 在cmd 命令行下:安装并启动: git clone https://github.com/Binaryify/NeteaseCloudMusicApi.git /* 下载 */cd Netea ...

  5. 网易云音乐API使用教程与遇到的问题

    网易云音乐API 简单又好用. 其实他那里面讲是很清楚了,有些地方小白不会,我帮他讲一下 1.在你的项目下 git clone git@github.com:Binaryify/NeteaseClou ...

  6. Github每日Rank推荐:网易云音乐API

    今天要推荐的github开源项目是NeteaseCloudMusicApi,即网易云音乐API,安装所需环境即可实现真实调用网易云音乐 API,包括注册.登录.搜索歌单歌词.歌曲点评等功能,请看客老爷 ...

  7. Github项目推荐:网易云音乐 API

    网易云音乐 API Github项目地址:https://github.com/Binaryify/NeteaseCloudMusicApi Github文档地址:https://binaryify. ...

  8. 免费稳定 = 网易云音乐API

    不知道为什么,自己对音乐比较痴迷,学习前端的时候总喜欢去借鉴什么音乐网站,但苦于没有稳定的后台数据,所以找到了这个基于Node的网易云音乐API,大家对可以直接通过 git clone ----> ...

  9. Docker 使用网易云音乐 API

    背景 最近想写一个一小程序,需要搜索音乐歌曲相关信息.找到了一个叫 NeteaseCloudMusicApi 网易云音乐 API 的GitHub 开源项目. 它的 GitHub 地址: Binaryi ...

最新文章

  1. [Git] 写文章 史上最全文献检索、阅读及管理攻略
  2. lmdb简介——结合MVCC的B+树嵌入式数据库
  3. IT职场规划和学习方法
  4. MATLAB GUI编程中几个有用的程序段
  5. 【计算机基础】存储器层次 Memory hierarchy
  6. 都是宝宝:北京孩子3成不玩电子游戏睡眠状况最好 江苏孩子起得最早
  7. 常用排序+查找算法时间复杂度大集合
  8. mysql数据库集群 主主复制 原理_MySql搭建集群 之 主主复制(双主代从)MYSQL数据库...
  9. day00 -----博客作业1
  10. VMware View 要求操作句柄的状态错误
  11. Tina Linux 蓝牙BT调试命令和方法-RealTek系列、Ampak系列、芯之联XR系列
  12. 中国GDP与百姓收入
  13. 红茶的功效与作用,喝红茶的好处和坏处,红茶的种类有哪些
  14. MATLAB图像处理_YUV格式详解
  15. 域中文件服务器的设置权限,域中文件服务器共享权限设置.pdf
  16. U8二开之界面增加按钮处理事件
  17. 高瓴投的澳斯康生物冲刺科创板:年营收4.5亿 丢掉与康希诺合作
  18. neo4j 图数据库初步调研 三元组、属性图、图模型、超图、RDF-f
  19. [博弈] LOJ#2471. 「九省联考 2018」一双木棋
  20. Options API

热门文章

  1. 刘桉齐:敏捷回顾会七步成诗法 | 真北群友作品
  2. 手把手教你如何推广博客网站
  3. 保安值班安排系统C语言课程设计
  4. et游戏自动翻译工具_ET的异常翻译
  5. aws docker_深入介绍AWS上的Docker
  6. 【Py】pyecharts数据可视化案例——地下室空气治理
  7. 腾讯一面,发现自己就是个渣渣
  8. MyBatis执行简单的CRUD
  9. 中国科学院大学计算机学院夏令营,中国科学院大学计算机网络信息中心2019年推免夏令营通知...
  10. Spring框架学习,day02