#!name=Spotify #!desc=具有歌词翻译功能,点击参数编辑进行设置,部分解锁 Premium,音质不能设置为超高,原则上可以关闭随机播放及去除播放广告,可以使歌手/专辑列表正常展示 #!arguments=歌词翻译:false, 翻译账户:申请并填入百度翻译AppID, 翻译密钥:申请并填入百度翻译密钥 #!arguments-desc=歌词翻译功能说明\n\n· 需申请百度翻译API的ID和密钥并填入,推荐高级版\n\n· 申请时建议使用桌面设备,移动设备可能访问失败\n\n· 成功启用后,歌词界面左下角即可看到翻译按钮\n\n - 注册百度翻译个人开发者,高级版需要实名认证: \n\n http://api.fanyi.baidu.com/register\n\n - 开通(通用文本翻译)API服务: \n\n https://fanyi-api.baidu.com/choose\n\n - 成功后即可看到自己的AppID和密钥(不要泄露): \n\n http://api.fanyi.baidu.com/manage/developer # 代码来源:https://github.com/app2smile # 仓库地址:https://github.com/LOWERTOP/Shadowrocket-First [Rule] DOMAIN-SUFFIX,ad.doubleclick.net,REJECT-DROP [Header Rewrite] # if-none-match返回304状态码 http-request ^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/user-customization-service\/v1\/customize$ header-del if-none-match [Script] spotify-json = type=http-request,pattern=^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/(artistview\/v1\/artist|album-entity-view\/v2\/album)\/,requires-body=0,script-path=https://raw.githubusercontent.com/app2smile/rules/master/js/spotify-json.js spotify-proto = type=http-response,pattern=^https:\/\/(spclient\.wg\.spotify\.com|.*-spclient\.spotify\.com(:443)?)\/(bootstrap\/v1\/bootstrap|user-customization-service\/v1\/customize)$,requires-body=1,binary-body-mode=1,max-size=0,script-path=https://raw.githubusercontent.com/app2smile/rules/master/js/spotify-proto.js,script-update-interval=0 spotify歌词翻译 = type=http-response,pattern=^https:\/\/spclient\.wg\.spotify\.com\/color-lyrics\/v2\/track\/,requires-body=1,binary-body-mode=1,max-size=0,script-path=https://raw.githubusercontent.com/app2smile/rules/master/js/spotify-lyric.js,enable={{{歌词翻译}}},argument=appid={{{翻译账户}}}&securityKey={{{翻译密钥}}} [MITM] hostname = %APPEND% spclient.wg.spotify.com, *spclient.spotify.com