Closed kennethshuai closed 5 years ago
@kennethshuai
目前bitrate
只支持以下2个参数,128k和320k:
bit_rate: {'MD 128k': 128000, 'HD 320k': 320000}
ncm已默认设置了320k(详见api.py
),至于你上面发的hMusic/mMusic/lMusic
,是无效的。在默认320k设置的前提下,若有320k则会直接下载。若没有,则会自动降级下载最高质量的mp3文件~ 退级策略是网易云那边控制的~ 这边都是统一传 320k 的参数。
上面的歌曲id=152261
,你可以自己用网易云的客户端设置最高音质下载试试,跟ncm下载回来的比特率是一致的~
我并没有看明白您的程序,
下述的下载让我感到奇怪, 第一,有hMusic,为何没有下载320kpbs的版本? 第二,没有128kpbs的版本,为何我下载下来的是128kpbs(显示)? (下述来自于摘抄:http://music.163.com/api/playlist/detail?id=152261)
{"name":"Tristan - Original","id":19558027,"position":18,"alias":[],"status":0,"fee":8,"copyrightId":655010,"disc":"1","no":18,"artists":[{"name":"Two Steps From Hell","id":102714,"picId":0,"img1v1Id":0,"briefDesc":"","picUrl":"http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","img1v1Url":"http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","albumSize":0,"alias":[],"trans":"","musicSize":0,"topicPerson":0}],"album":{"name":"Invincible","id":1800915,"type":"专辑","size":22,"picId":6658642418470358,"blurPicUrl":"http://p1.music.126.net/vHXzXIE1G7FRgA89e3CuAg==/6658642418470358.jpg","companyId":0,"pic":6658642418470358,"picUrl":"http://p1.music.126.net/vHXzXIE1G7FRgA89e3CuAg==/6658642418470358.jpg","publishTime":1272816000000,"description":"","tags":"","company":"Two Steps From Hell","briefDesc":"","artist":{"name":"","id":0,"picId":0,"img1v1Id":0,"briefDesc":"","picUrl":"http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","img1v1Url":"http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","albumSize":0,"alias":[],"trans":"","musicSize":0,"topicPerson":0},"songs":[],"alias":["万夫莫敌"],"status":1,"copyrightId":0,"commentThreadId":"R_AL_3_1800915","artists":[{"name":"Two Steps From Hell","id":102714,"picId":0,"img1v1Id":0,"briefDesc":"","picUrl":"http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","img1v1Url":"http://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","albumSize":0,"alias":[],"trans":"","musicSize":0,"topicPerson":0}],"subType":"录音室版","transName":null},"starred":false,"popularity":85.0,"score":85,"starredNum":0,"duration":154626,"playedNum":0,"dayPlays":0,"hearTime":0,"ringtone":"","crbt":null,"audition":null,"copyFrom":"","commentThreadId":"R_SO_4_19558027","rtUrl":null,"ftype":0,"rtUrls":[],"copyright":2,"transName":null,"sign":"Original","rtype":0,"rurl":null,"mvid":0,"bMusic":{"name":null,"id":102790001,"size":1856409,"extension":"mp3","sr":44100,"dfsId":0,"bitrate":96000,"playTime":154626,"volumeDelta":-0.58},"mp3Url":null,"hMusic":{"name":null,"id":102681999,"size":6187928,"extension":"mp3","sr":44100,"dfsId":0,"bitrate":320000,"playTime":154626,"volumeDelta":-0.96},"mMusic":{"name":null,"id":102682000,"size":3093986,"extension":"mp3","sr":44100,"dfsId":0,"bitrate":160000,"playTime":154626,"volumeDelta":-0.53},"lMusic":{"name":null,"id":102790001,"size":1856409,"extension":"mp3","sr":44100,"dfsId":0,"bitrate":96000,"playTime":154626,"volumeDelta":-0.58}}