酷我音乐API

转自https://www.cnblogs.com/daxiangxm/p/kuwo_music_api.html

今天把酷我音乐API分享给大家:

歌曲搜索API:http://search.kuwo.cn/r.s?all={0}&ft=music& itemset=web_2013&client=kt&pn={1}&rn={2}&rformat=json&encoding=utf8

{0}=需要搜索的歌曲或歌手

{1}=查询的页码数

{2}=当前页的返回数量

例子:http://search.kuwo.cn/r.s?all=周杰伦&ft=music& itemset=web_2013&client=kt&pn=0&rn=5&rformat=json&encoding=utf8

 

{
    'RN': '5',
    'PN': '0',
    'HIT': '3538',
    'TOTAL': '3538',
    'SHOW': '5',
    'NEW': '0',
    'MSHOW': '0',
    'HITMODE': 'song',
    'ARTISTPIC': '',
    'HIT_BUT_OFFLINE': '0',
    'abslist': [
        {
            'MUSICRID': 'MUSIC_324244',
            'SONGNAME': '青花瓷',
            'ARTIST': '周杰伦',
            'ARTISTID': '336',
            'ALBUM': '我很忙',
            'ALBUMID': '12449',
            'FORMATS': 'WMA96|WMA128|MP3128|MP3192|MP3H|AAC48|AL|MV500|MV700|EXMV500|EXMV700|MP4|MP4L|EXMP4|EXMP4L',
            'SCORE100': '86',
            'NSIG1': '1776556291',
            'NSIG2': '2210916518',
            'MP3NSIG1': '724957921',
            'MP3NSIG2': '2129722879',
            'MP3RID': 'MP3_324244',
            'MKVNSIG1': '720436733',
            'MKVNSIG2': '81430645',
            'MKVRID': 'MV_6359',
            'HASECHO': '1',
            'NEW': '0',
            'MVPIC': '140/45/77/2616358704.jpg',
            'UPLOADER': '',
            'UPTIME': '',
            'IS_POINT': '0',
            'MUTI_VER': '146',
            'ONLINE': '1',
            'IS_EXT': '0'
        },
        {
            'MUSICRID': 'MUSIC_6176029',
            'SONGNAME': '算什么男人',
            'ARTIST': '周杰伦',
            'ARTISTID': '336',
            'ALBUM': '哎呦,
            不错哦',
            'ALBUMID': '439471',
            'FORMATS': 'WMA96|WMA128|MP3128|MP3192|MP3H|AAC48|AL|MV500|MV700|EXMV500|EXMV700|MP4|MP4L|EXMP4|EXMP4L',
            'SCORE100': '85',
            'NSIG1': '908013556',
            'NSIG2': '1986154045',
            'MP3NSIG1': '3455506400',
            'MP3NSIG2': '1941249395',
            'MP3RID': 'MP3_6176029',
            'MKVNSIG1': '2717454401',
            'MKVNSIG2': '2828692473',
            'MKVRID': 'MV_343625',
            'HASECHO': '1',
            'NEW': '0',
            'MVPIC': '140/40/31/2326060457.jpg',
            'UPLOADER': '',
            'UPTIME': '',
            'IS_POINT': '1',
            'MUTI_VER': '0',
            'ONLINE': '1',
            'IS_EXT': '0'
        },
        {
            'MUSICRID': 'MUSIC_79479',
            'SONGNAME': '东风破',
            'ARTIST': '周杰伦',
            'ARTISTID': '336',
            'ALBUM': '叶惠美',
            'ALBUMID': '1293',
            'FORMATS': 'WMA96|WMA128|MP3128|MP3192|MP3H|AAC48|AL|MV500|MV700|EXMV500|EXMV700|MP4|MP4L|EXMP4|EXMP4L',
            'SCORE100': '81',
            'NSIG1': '3651591386',
            'NSIG2': '2238585711',
            'MP3NSIG1': '3873527664',
            'MP3NSIG2': '2314212502',
            'MP3RID': 'MP3_79479',
            'MKVNSIG1': '1092846520',
            'MKVNSIG2': '218140751',
            'MKVRID': 'MV_221840',
            'HASECHO': '1',
            'NEW': '0',
            'MVPIC': '140/76/65/3389188905.jpg',
            'UPLOADER': '',
            'UPTIME': '',
            'IS_POINT': '0',
            'MUTI_VER': '169',
            'ONLINE': '1',
            'IS_EXT': '0'
        },
        {
            'MUSICRID': 'MUSIC_94237',
            'SONGNAME': '七里香',
            'ARTIST': '周杰伦',
            'ARTISTID': '336',
            'ALBUM': '七里香',
            'ALBUMID': '4533',
            'FORMATS': 'WMA96|WMA128|MP3128|MP3192|MP3H|AAC48|AL|MV500|MV700|EXMV500|EXMV700|MP4|MP4L|EXMP4|EXMP4L',
            'SCORE100': '80',
            'NSIG1': '2053335453',
            'NSIG2': '4101276292',
            'MP3NSIG1': '3913207931',
            'MP3NSIG2': '1212072991',
            'MP3RID': 'MP3_94237',
            'MKVNSIG1': '3244538870',
            'MKVNSIG2': '4119271117',
            'MKVRID': 'MV_223429',
            'HASECHO': '1',
            'NEW': '0',
            'MVPIC': '140/88/64/3638464554.jpg',
            'UPLOADER': '',
            'UPTIME': '',
            'IS_POINT': '0',
            'MUTI_VER': '0',
            'ONLINE': '1',
            'IS_EXT': '0'
        },
        {
            'MUSICRID': 'MUSIC_243826',
            'SONGNAME': '龙卷风',
            'ARTIST': '周杰伦',
            'ARTISTID': '336',
            'ALBUM': 'Jay同名专辑',
            'ALBUMID': '1286',
            'FORMATS': 'WMA96|WMA128|MP3128|MP3192|MP3H|AAC48|AL|MV500|MV700|EXMV500|EXMV700|MP4|MP4L|EXMP4|EXMP4L',
            'SCORE100': '79',
            'NSIG1': '3640918255',
            'NSIG2': '1730930118',
            'MP3NSIG1': '414215692',
            'MP3NSIG2': '3291603321',
            'MP3RID': 'MP3_243826',
            'MKVNSIG1': '1167609102',
            'MKVNSIG2': '1023337506',
            'MKVRID': 'MV_144597',
            'HASECHO': '1',
            'NEW': '0',
            'MVPIC': '140/27/76/3036706216.jpg',
            'UPLOADER': '',
            'UPTIME': '',
            'IS_POINT': '0',
            'MUTI_VER': '109',
            'ONLINE': '1',
            'IS_EXT': '0'
        }
    ]
}

 

 

上面返回的json可以得到歌曲名,歌手,歌曲ID,专辑,歌曲图片

 

歌曲播放API:http://antiserver.kuwo.cn/anti.s?type=convert_url&rid={0}&format=aac|mp3&response=url

{0}=上面获取到的歌曲ID

例子:http://antiserver.kuwo.cn/anti.s?type=convert_url&rid=MUSIC_324244&format=aac|mp3&response=url

 

歌词——酷我音乐的歌词比较麻烦,歌词部分给加密了,目前还没有解密出来,希望有大神解密出来可以告诉我

API:http://player.kuwo.cn/webmusic/st/getNewMuiseByRid?rid={0}

{0}=上面获取到的歌曲ID

例子:http://player.kuwo.cn/webmusic/st/getNewMuiseByRid?rid=MUSIC_324244
返回

 

<Song>
    <music_id>324244</music_id>
    <mv_rid>MV_0</mv_rid>
    <name>青花瓷</name>
    <song_url>http://yinyue.kuwo.cnhttp://yinyue.kuwo.cn/yy/gequ-zhoujielun_qinghuaci/324244.htm</song_url>
    <artist>周杰伦</artist>
    <artid>336</artid>
    <singer>周杰伦</singer>
    <special>我很忙</special>
    <ridmd591>FDF7A656B2D08C28749975918E6883F0</ridmd591>
    <mp3size>9.06 MB</mp3size>
    <artist_url>http://yinyue.kuwo.cnhttp://yinyue.kuwo.cn/yy/geshou-zhoujielun/%E5%91%A8%E6%9D%B0%E4%BC%A6.htm</artist_url>
    <auther_url>http://www.kuwo.cn/mingxing/%E5%91%A8%E6%9D%B0%E4%BC%A6/</auther_url>
    <playid>play?play=MQ==&amp;num=MQ==&amp;name0=x+C7qLTJ&amp;artist0=1ty93MLX&amp;ssig10=MTc3NjU1NjI5MQ==&amp;ssig20=MjIxMDkxNjUxOA==&amp;musicrid0=TVVTSUNfMzI0MjQ0&amp;mvrid0=TVZfMA==&amp;mp3size0=OS4wNiBNQg==&amp;mrid0=TVAzXzMyNDI0NA==&amp;msig10=NzI0OTU3OTIx&amp;msig20=MjEyOTcyMjg3OQ==&amp;mkvnsig10=NzIwNDM2NzMz&amp;mkvnsig20=ODE0MzA2NDU=&amp;mkvrid0=TVZfNjM1OQ==&amp;mvsig10=MA==&amp;mvsig20=MA==&amp;size0=My42NSBNQg==&amp;album0=ztK63MOm&amp;kalaok0=MA==&amp;hasecho0=MQ==&amp;filetype0=c29uZw==&amp;score0=NA==&amp;source0=aHR0cDovL3dtYTEuNmZsb29yLmNvbS8vcXExMzBuLzA2OTcvMzY1Nzk5NTA0LndtYQ==&amp;mvprovider0=&amp;</playid>
    <artist_pic>http://img4.kuwo.cn/star/starheads/120/4/80a74b254395e7d786fdc3f68703377_0.jpg</artist_pic>
    <artist_pic240>http://img4.kuwo.cn/star/starheads/240/41/35/524369432.jpg</artist_pic240>
    <path>m2/ape2wma_20090522/1/17/1932419956.wma</path>
    <mp3path>n2/128/20/88/154812657.mp3</mp3path>
    <aacpath>a3/79/0/1486163889.aac</aacpath>
    <wmadl>wmadl.cdn.kuwo.cn</wmadl>
    <mp3dl>ra01.sycdn.kuwo.cn</mp3dl>
    <aacdl>ra03.sycdn.kuwo.cn</aacdl>
    <lyric>DBYAHlReXEpRUEAeCgxVEgAORRgLG0MXCRgaCwoRAB5UAwEaBAkEBhwaXxcAHVReSAsMAVEkOj0wJjpfW1tcTVE=</lyric>
    <lyric_zz>DBYAHlReXEpRUEAeCgxVEgAORRgLG0MXCRgaCwoRAB5UAwEaBAkEBhwaXxcAHVReSAsMAVEkOj0wJjpfW1tcTVFDABsMFkRU</lyric_zz>
</Song>

 

lrcKey=上面xml的lyric属性

lrcKey=DBYAHlReXEpRUEAeCgxVEgAORRgLG0MXCRgaCwoRAB5UAwEaBAkEBhwaXxcAHVReSAsMAVEkOj0wJjpfW1tcTVE=

API:http://newlyric.kuwo.cn/newlyric.lrc?{0}

{0}=取到的lrcKey

例子:http://newlyric.kuwo.cn/newlyric.lrc?DBYAHlReXEpRUEAeCgxVEgAORRgLG0MXCRgaCwoRAB5UAwEaBAkEBhwaXxcAHVReSAsMAVEkOj0wJjpfW1tcTVE=

目前还存在一个问题就是获取的歌词是加密的,如果你能破解歌词加密,欢迎联系我。

 

上一篇:深度学习-链式求导


下一篇:一份简明的 Base64 原理解析