传送门: 音乐鉴赏
1.搜到歌曲后,先试听
2.F12打开浏览器开发者工具,选network,勾选media
3.把代码复制下来
如果你是Windows系统:鼠标对准该文件,右键,复制,以 PowerShell 格式复制
打开powershell 加上后缀:
-OutFile ‘E:/download.mp3’
//如下图所示
//完整代码如下:文章来源地址https://www.toymoban.com/news/detail-702767.html
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
>> $session.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
>> Invoke-WebRequest -UseBasicParsing -Uri "https://mp3.haoge500.com/upload/128/2017/09/20/868202.mp3" `
>> -WebSession $session `
>> -Headers @{
>> "authority"="mp3.haoge500.com"
>> "method"="GET"
>> "path"="/upload/128/2017/09/20/868202.mp3"
>> "scheme"="https"
>> "accept"="*/*"
>> "accept-encoding"="identity;q=1, *;q=0"
>> "accept-language"="zh-CN,zh;q=0.9"
>> "referer"="https://www.zz123.com/"
>> "sec-ch-ua"="`"Not_A Brand`";v=`"99`", `"Google Chrome`";v=`"109`", `"Chromium`";v=`"109`""
>> "sec-ch-ua-mobile"="?0"
>> "sec-ch-ua-platform"="`"Windows`""
>> "sec-fetch-dest"="audio"
>> "sec-fetch-mode"="no-cors"
>> "sec-fetch-site"="cross-site"
>> } -OutFile ‘E:/download.mp3’
完成后,去E盘里找,如果你没有E盘就改一下代码到其他盘
Mac或Linux用户:鼠标对准该文件,右键,复制,以 cURL 格式复制
复制到你的命令行之后,尾部加个 -O文章来源:https://www.toymoban.com/news/detail-702767.html
//完整代码如下:
curl 'https://freetyst.nf.migu.cn/public/product9th/product45/2022/05/0716/2009%E5%B9%B406%E6%9C%8826%E6%97%A5%E5%8D%9A%E5%B0%94%E6%99%AE%E6%96%AF/%E6%A0%87%E6%B8%85%E9%AB%98%E6%B8%85/MP3_320_16_Stero/60054701942164749.mp3' \
-H 'Accept: */*' \
-H 'Accept-Language: zh-CN,zh;q=0.9' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Range: bytes=0-' \
-H 'Referer: https://zz123.com/' \
-H 'Sec-Fetch-Dest: audio' \
-H 'Sec-Fetch-Mode: no-cors' \
-H 'Sec-Fetch-Site: cross-site' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \
-H 'sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
--compressed -O
你的任意一个音乐播放器,打开下载好的文件即可畅听~
到了这里,关于一招教你下载网页里的音乐或资源文件的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!