JOOX音源是不是失效了?
您好,请问joox音源有考虑维护吗 我试用了下,曲库还可以(可以理解成QQ音乐的海外版)
在代理IP满足条件的情况下(香港),始终无法成功获取到url地址
JOOX 的区域限制很严格,我们不在它所要求的区域,也并没有对它的需求。 PR is welcome.
現在 JOOX 應該是需要登入了。感謝您的回報!這問題我會標上 help wanted 讓有志之士得以改進。
登陆问题加个header可以解决(wmid & session_key),之后使用两个接口测试能正常获取到信息。 我觉得是json数据解析的问题?
T_T 技术不到位,只能测出这么多了……
tbh I cannot even access joox...
登陆问题加个header可以解决(wmid & session_key),之后使用两个接口测试能正常获取到信息。 我觉得是json数据解析的问题?
T_T 技术不到位,只能测出这么多了……
不知道你能不能提供完整的 curl 請求,讓我們參考 header 怎麼寫?
登陆问题加个header可以解决(wmid & session_key),之后使用两个接口测试能正常获取到信息。 我觉得是json数据解析的问题? T_T 技术不到位,只能测出这么多了……
不知道你能不能提供完整的 curl 請求,讓我們參考 header 怎麼寫?
const headers = {
'origin': 'http://www.joox.com',
'referer': 'http://www.joox.com',
+ 'Cookie': 'wmid=<your_wmid>; session_key=<your_sessionkey>;'
}
这样就可以了,然后 src/provider/joox.js 文件中 http://api.joox.com/web-fcgi-bin/web_get_songinfo 这个接口需要使用非限制区域IP请求,另一个 Host 我测试没有区域限制。
可以访问的区域包括:香港、澳门、泰国、印度尼西亚、马来西亚、缅甸、南非。
@pan93412 另外对这个接口的测试情况如下,加上header能够正常响应,访问资源文件链接也不限制IP
curl -H "Cookie: wmid=<your_wmid>; session_key=<your_session_key>;" "http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=Z406z0UqkPA2tpOh0S35FQ==&country=hk&lang=zh_cn&from_type=-1&channel_id=-1"
MusicInfoCallback({"album_url":"https://image.joox.com/JOOXcover/0/abbe5ccd911f9099/1000","code":0,"country":"hk","encodeSongId":"Z406z0UqkPA2tpOh0S35FQ==","express_domain":"https://stream.music.joox.com/","flag":0,"gososo":0,"has_hifi":false,"has_hq":false,"has_preview":0,"imgSrc":"https://image.joox.com/JOOXcover/0/abbe5ccd911f9099/1000","kbps_map":"{\"128\":2961446,\"192\":4474297,\"24\":588994,\"320\":7403308,\"48\":1143596,\"96\":2253888,\"ape\":0,\"flac\":0}\n","ktrack_id":1330313,"m4aUrl":"https://hk.stream.music.joox.com/C400Zea52b270384ff.m4a?vkey=742F9A1B41D4368BBAAC228E36D357D4EB19B0ECBEFD06FEF9922EC129A63037FADDD59285EF60B3A0033759F191B724CB597984E09E3E19&hdnts=exp=1628474864~acl=/*~hmac=33965cb85b5e01ca28236c735210eb1f025dd8f0391382c4d1bc708b5dc8b3da&fromtag=8&guid=JOOX@WEB_OPENUDID","malbum":"Mojito","malbumid":401194687,"malbummid":"f48514ce5eea2a42","minterval":1,"mmid":"000IwslY0CY2mr","mp3Url":"https://hk.stream.music.joox.com/M500Zea52b270384ff.mp3?vkey=AA1BF0B51BD4E0971FF22AE79622852B9AAE65D8CDCF680B30CE9DCC2CADD5CC921FA61D264639218CCDF7EECEE11F01D0896ECDD0E769F5&hdnts=exp=1628474864~acl=/*~hmac=33965cb85b5e01ca28236c735210eb1f025dd8f0391382c4d1bc708b5dc8b3da&fromtag=8&guid=JOOX@WEB_OPENUDID","msg":"","msinger":"周杰倫","msingerid":4558,"msingermid":"0025NhlN2yWrP4","msize":8762785,"msong":"Mojito","public_time":"2020-06-12","r192Url":"https://hk.stream.music.joox.com/C600Zea52b270384ff.m4a?vkey=BC363402D860F22F7A5D7959D4DF3038AE23A5E86797AEC3D128F3C883760AC5E4D2BA37E2A46E5736769BAFF5E73798EA951CAB891086A6&hdnts=exp=1628474864~acl=/*~hmac=33965cb85b5e01ca28236c735210eb1f025dd8f0391382c4d1bc708b5dc8b3da&fromtag=8&guid=JOOX@WEB_OPENUDID","r320Url":"https://hk.stream.music.joox.com/M800Zea52b270384ff.mp3?vkey=EC0FD54A593E331BAAE89049E6805296C496FA046E1072BAB94ADD1D06CAFCE9056D85E3E1B99E0FD424FFE453EFA499C57F2BB185C3CA10&hdnts=exp=1628474864~acl=/*~hmac=33965cb85b5e01ca28236c735210eb1f025dd8f0391382c4d1bc708b5dc8b3da&guid=JOOX@WEB_OPENUDID&uin=0&fromtag=8","singer_list":[{"id":4558,"name":"5ZGo5p2w5YCr"}],"size128":2961446,"size320":7403308,"songInfoMid":"000IwslY0CY2mr","songmid":"Zea52b270384ff","source_id":18,"subscript":[],"track_label_flag":1,"web_fully_play":0}
謝謝 @gitiray 的幫忙~已加為 commit 的共同協作者
谢谢,可以作为音源使用了
是改了哪里呢,我看代码,除了加cookie,剩下好像都是格式优化?不明白为什么之前我自己加cookie就不能在程序内正确解析
谢谢,可以作为音源使用了
是改了哪里呢,我看代码,除了加cookie,剩下好像都是格式优化?不明白为什么之前我自己加cookie就不能在程序内正确解析
不太清楚,可能是 cookie 的特殊字元導致 shell 解析出錯?反正能用就好~
最近换了服务器,重装后问题再次出现,curl 能得到链接,但 UNM 失败
INFO: (app) HTTP Server running @ http://0.0.0.0:8080
DEBUG: (cache) Cleaning up the expired caches...
cacheStorageId: "provider/find"
DEBUG: (cache) 1454811222 did not hit. Storing the execution result...
logKey: 1454811222
cacheStorageId: "provider/find"
DEBUG: (request) Start requesting https://music.163.com/api/song/detail?ids=[1454811222]
DEBUG: (provider/match) Getting the audio...
source: "joox"
info: {
"name": "Mojito",
"id": 1454811222,
"alias": [],
"duration": 185008,
"album": {
"name": "Mojito",
"id": 90743831
},
"artists": [
{
"name": "周杰伦",
"id": 6452
}
],
"keyword": "Mojito - 周杰伦"
}
DEBUG: (cache) Cleaning up the expired caches...
cacheStorageId: "provider/joox"
DEBUG: (cache) Something did not hit. Storing the execution result...
logKey: "Something"
cacheStorageId: "provider/joox"
DEBUG: (request) Start requesting http://api-jooxtt.sanook.com/web-fcgi-bin/web_search?country=hk&lang=zh_TW&search_input=Mojito%20-%20%E5%91%A8%E6%9D%B0%E4%BC%A6&sin=0&ein=30
DEBUG: (request) Start requesting http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=Z406z0UqkPA2tpOh0S35FQ==&country=hk&lang=zh_cn&from_type=-1&channel_id=-1&_=1657175495337
ERROR: (hook) All promises were rejected
AggregateError: All promises were rejected
看起来问题还是出在 api.joox.com,使用 curl 测试
curl -H 'Cookie: wmid=<your_wmid>; session_key=<your_session_key>;' 'http://api.joox.com/web-fcgi-bin/web_get_songinfo?songid=Z406z0UqkPA2tpOh0S35FQ==&country=hk&lang=zh_cn&from_type=-1&channel_id=-1'
MusicInfoCallback({"album_url":"https://image.joox.com/JOOXcover/0/abbe5ccd911f9099/1000","code":0,"country":"hk","encodeSongId":"Z406z0UqkPA2tpOh0S35FQ==","express_domain":"https://stream.music.joox.com/","flag":0,"gososo":0,"has_hifi":false,"has_hq":false,"has_preview":0,"imgSrc":"https://image.joox.com/JOOXcover/0/abbe5ccd911f9099/1000","kbps_map":"{\"128\":2961446,\"192\":4474297,\"24\":588994,\"320\":7403308,\"48\":1143596,\"96\":2253888,\"ape\":0,\"flac\":0}\n","ktrack_id":1330313,"m4aUrl":"https://hk.stream.music.joox.com/C400Z792b0a67f1502.m4a?vkey=XXXXXXXXXXXXXXXXXXXX&hdnts=exp=1657180859~acl=/*~hmac=XXXXXXXXXXXXXXXXXXXX&fromtag=8&guid=JOOX@WEB_OPENUDID","malbum":"Mojito","malbumid":401194687,"malbummid":"f48514ce5eea2a42","minterval":1,"mmid":"000IwslY0CY2mr","mp3Url":"https://hk.stream.music.joox.com/M500Z792b0a67f1502.mp3?vkey=XXXXXXXXXXXXXXXXXXXX&hdnts=exp=1657180859~acl=/*~hmac=XXXXXXXXXXXXXXXXXXXX&fromtag=8&guid=JOOX@WEB_OPENUDID","msg":"","msinger":"周杰倫","msingerid":4558,"msingermid":"https://joox-cms-image-1251316161.file.myqcloud.com/2021/09/23/ad1ca4a5-3f62-4978-8495-b6152fe74ade.jpg/1000","msize":8762785,"msong":"Mojito","public_time":"2020-06-12","r192Url":"https://hk.stream.music.joox.com/C600Z792b0a67f1502.m4a?vkey=XXXXXXXXXXXXXXXXXXXX&hdnts=exp=1657180859~acl=/*~hmac=XXXXXXXXXXXXXXXXXXXX&fromtag=8&guid=JOOX@WEB_OPENUDID","r320Url":"https://hk.stream.music.joox.com/M800Z792b0a67f1502.mp3?vkey=XXXXXXXXXXXXXXXXXXXX&hdnts=exp=1657180859~acl=/*~hmac=XXXXXXXXXXXXXXXXXXXX&guid=JOOX@WEB_OPENUDID&uin=0&fromtag=8","singer_list":[{"id":4558,"name":"5ZGo5p2w5YCr"}],"size128":2961446,"size320":7403308,"songInfoMid":"000IwslY0CY2mr","songmid":"Z792b0a67f1502","source_id":18,"subscript":[],"track_label_flag":1,"web_fully_play":0}
curl 测试能返回带音乐链接的内容,说明网络环境、请求结构都是ok的 还是怀疑UNM对数据的解析有问题,之前修复没找到问题所在,是不知道怎么的好了