//歌曲下载地址 : http://music.163.com/song/media/outer/url?id=ID数字.mp3 protected override async Task ParseInfo(string id) { var detailResult = await HttpUtil.Get($"https://api.imjad.cn/cloudmusic/?type=detail&id={id}"); var detailData = JObject.Parse(detailResult); var songResult = await HttpUtil.Get($"https://api.imjad.cn/cloudmusic/?type=song&id={id}"); var songData = JObject.Parse(songResult); var songRoot = songData["data"][0]; var detailRoot = detailData["songs"][0]; Name = detailRoot.Value <string>("name"); Album = detailRoot["al"].Value <string>("name"); CoverUrl = detailRoot["al"].Value <string>("picUrl"); foreach (var token in detailRoot["ar"]) { Singer.Add(token.Value <string>("name")); } Mp3Urls.Add(songRoot.Value <string>("url")); Mp3Urls.RemoveAll((_) => string.IsNullOrEmpty(_)); if (Mp3Urls.Count == 0) { throw new Exception($"歌曲 {Name} 暂时不支持下载,也不支持试听"); } }
protected override async Task ParseInfo(string id) { var result = await HttpUtil.Get("http://player.kuwo.cn/webmusic/st/getNewMuiseByRid?rid=MUSIC_" + id); var doc = new XmlDocument(); doc.LoadXml(result.XMLEncode()); var root = doc.DocumentElement; Name = root.GetValue("name"); Singer.Add(root.GetValue("singer")); Album = root.GetValue("special"); CoverUrl = root.GetValue("artist_pic"); var mp3dl = root.GetValue("mp3dl").XMLDecode(); var mp3path = root.GetValue("mp3path").XMLDecode(); Mp3Urls.Add($"http://{mp3dl}{mp3path}"); //var mp3dl = root.GetValue("mp3dl"); //var mp3path = root.GetValue("mp3path"); //Mp3Url = $"http://ra01.sycdn.kuwo.cn/resource/{mp3path}"; //Mp3Url = $"http://{mp3dl}{mp3path}"; // http://antiserver.kuwo.cn/anti.s?useless=/resource/{mp3path} }