酷我音乐分析
前言
近来各大音乐平台听歌都要vip了,因而萌发了自建音乐网站的想法,不过仅为学习交流哦。
目标
经过初步思考,确定了五个音乐平台:网易云音乐、QQ音乐、酷我音乐、酷狗音乐、咪咕音乐。使用python为主要语言,模板为Flask,部署于Heroku,有四个功能:推荐、搜索、播放、下载。
分析接口
酷我音乐
1.推荐歌单
地址: https://kuwo.cn/api/www/rcm/index/playlist
参数:httpsStatus=1
请求头:csrf=Vergica
cookie:kw_token=Vergica1
2.歌单详情
地址:https://kuwo.cn/api/www/playlist/playListInfo
参数:pid=歌单id,pn=页数,rn=个数,httpsStatus=1
请求头:csrf=Vergica
cookie:kw_token=Vergica
3.搜索音乐
地址:https://kuwo.cn/api/www/search/searchMusicBykeyWord
参数:key=搜索内容,pn=页数,rn=个数,httpsStatus=1,reqId=Vergica
请求头:csrf=Vergica,referer=kuwo.cn
cookie:kw_token=Vergica
4.搜索歌手
地址:https://kuwo.cn/api/www/search/searchArtistBykeyWord
参数:key=搜索内容,pn=页数,rn=个数,httpsStatus=1,reqId=Vergica
请求头:csrf=Vergica,referer=kuwo.cn
cookie:kw_token=Vergica
5.歌曲详情
①歌名、歌手、专辑、专辑图片、时长、歌词
地址:https://m.kuwo.cn/newh5/singles/songinfoandlrc
参数:musicId=歌曲id
②播放地址
地址:https://kuwo.cn/url
参数:format=mp3,type=convert_url3,rid=歌曲id
③热评
地址:https://kuwo.cn/comment
参数:type=get_rec_comment,f=web,uid=0,digest=15,page=页数,rows=个数,sid=歌曲id
csrf与kw_token值为任意文本即可,但必须相同,以下任意文本均以Vergica代替,不另写注脚。 ↩︎
浙公网安备 33010602011771号