×

酷狗音乐真实地址解析

hqy hqy 发表于2025-01-01 00:39:14 浏览32 评论0

抢沙发发表评论

酷狗音乐解析这里还是起了一点波折



酷狗音乐是通过hash来获取音乐的,刚开始我并没有去直接抓包,而是通过百度去看看前辈没抓下来的接口

http://m.kugou.com/app/i/getSongInfo.php?cmd=playInfo&hash=A12B8551334EEA1EA8E2A53A89741675

刚开始确实是通过这个抓到了音乐的真实地址



json格式化一下



可以看到我们确实获取到了

之后我使用php的curl函数去模拟请求获取返回json数据出了问题



之后就是无论请求多少次都是这样了



估计是酷狗加上了防护吧

我还是去重新抓包一下

打开酷狗网页版本 找一首音乐按下f12



是通过hash找的我就直接去搜索



找到了新的接口

https://wwwapi.kugou.com/yy/index.php?r=play/getdata&callback=jQuery191038819089436869936_1569586443203&hash=C1373B658BB627E0028A68D324A60375&album_id=23509815&dfid=1sgvuv1ijflP0Z3ZGK4YrVhj&mid=739ca965744286ce43566baca8801501&platid=4&_=1569586443204

同样是替换hash即可



酷狗下载音乐,懒人必看:不想下载客户端,不想注册登录
简单2步获取原始下载链接:
1.打开浏览控制台,搜索关键字"mp3"
2.找到songinfo,响应的json数据play_backup_url里有 mp3的真实链接,就是音乐的下载地址
点我看大图
3.把地址的 "\/ " 替换成 “/” ,不用反斜杠,改好后访问链接,另存音乐






image.png

打开地址,返回json文件


image.png

复制后在线格式化一下  https://www.jsongj.com/



 {
    "status":1,
    "err_code":0,
    "data":{
        "hash":"F1664259DFA599E5EC08FAC4D0F1936A",
        "timelength":172146,
        "filesize":2755041,
        "audio_name":"Daniel Humphrey - From the Ashes",
        "have_album":1,
        "album_name":"A Light in the Dark",
        "album_id":"72414521",
        "img":"http:\/\/imge.kugou.com\/stdmusic\/20230412\/20230412083304659681.jpg",
        "have_mv":0,
        "video_id":0,
        "author_name":"Daniel Humphrey",
        "song_name":"From the Ashes",
        "lyrics":"\ufeff[id:$00000000]\r\n[ar:arkady sevidov]\r\n[ti:June]\r\n[by:]\r\n[hash:4399c9872c7235b60b58ce88dc487897]\r\n[al:]\r\n[sign:]\r\n[qq:]\r\n[total:320317]\r\n[offset:0]\r\n[00:01.58]\u7eaf\u97f3\u4e50\uff0c\u8bf7\u6b23\u8d4f\r\n",
        "author_id":"465993",
        "privilege":8,
        "privilege2":"1000",
        "play_url":"https:\/\/webfs.kugou.com\/202501010001\/38cb8236059ebc797ed2dc8d65ecc8cf\/v3\/f1664259dfa599e5ec08fac4d0f1936a\/yp\/full\/ap1014_us0_mib51fe0a2d272ab75d8f9b6ba8983f5cd_pi406_mx509765215_s2089616323.mp3",
        "authors":[
            {
                "author_id":"465993",
                "author_name":"Daniel Humphrey",
                "is_publish":"1",
                "sizable_avatar":"",
                "e_author_id":"E729KE3774E12",
                "avatar":""
            }

        ]
,
        "is_free_part":0,
        "bitrate":128,
        "recommend_album_id":72414521,
        "store_type":"audio",
        "album_audio_id":509765215,
        "is_publish":1,
        "e_author_id":"E729KE3774E12",
        "audio_id":"177526756",
        "has_privilege":true,
        "play_backup_url":"https:\/\/webfs.tx.kugou.com\/202501010001\/2b366e4c16ddfdc068d8c0d0689ac2b0\/v3\/f1664259dfa599e5ec08fac4d0f1936a\/yp\/full\/ap1014_us0_mib51fe0a2d272ab75d8f9b6ba8983f5cd_pi406_mx509765215_s2089616323.mp3",
        "small_library_song":1,
        "encode_album_id":"1743eh9f",
        "encode_album_audio_id":"8fi1cvdc",
        "e_video_id":"0df"
    }

}




把红色地址的 "\/ " 替换成 “/” ,不用反斜杠,改好后访问链接,另存音乐


打赏

本文链接:https://www.kinber.cn/post/4418.html 转载需授权!

分享到:


推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

 您阅读本篇文章共花了: 

群贤毕至

访客