Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

请求播客上传声音接口 #1789

Closed
nooblong opened this issue Aug 21, 2023 · 7 comments
Closed

请求播客上传声音接口 #1789

nooblong opened this issue Aug 21, 2023 · 7 comments

Comments

@nooblong
Copy link
Contributor

music.163.com -> 创作者中心 ->
云音乐达人 -> 发布声音 -> 上传声音文件

没有文档看不太懂

fetch("https://music.163.com/api/nos/token/alloc?filename=%E5%96%80%E7%A7%8B%E8%8E%8E(%E5%B0%91%E6%88%98).mp3&ext=mp3&type=other&bucket=ymusic&local=false&nos_product=0", {
  "headers": {
    "accept": "application/json",
    "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6",
    "content-type": "application/x-www-form-urlencoded",
    "sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin"
  },
  "referrer": "https://music.163.com/st/ncreator/upload?userType=3",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": null,
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

{
    "code": 200,
    "result": {
        "bucket": "ymusic",
        "docId": "509951163304242201",
        "objectKey": "EaACHxgc1i_5adnFcy13tA==/509951163304242201",
        "token": "UPLOAD 037a197cb50b42468694de59c0bdd9b1:zLgSQ9DTJAXpkk6jZXuDYGie3KrZ7Kh7Xsp49u3cveU=:eyJCdWNrZXQiOiJ5bXVzaWMiLCJSZWdpb24iOiJIWiIsIk9iamVjdCI6IkVhQUNIeGdjMWlfNWFkbkZjeTEzdEE9PS81MDk5NTExNjMzMDQyNDIyMDEiLCJFeHBpcmVzIjoxNjkyNDU0MTY4fQ=="
    }
}
fetch("https://ymusic.nos-hz.163yun.com/EaACHxgc1i_5adnFcy13tA==/509951163304242201?uploads", {
  "headers": {
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6",
    "sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "cross-site",
    "x-nos-meta-content-type": "audio/mpeg",
    "x-nos-token": "UPLOAD 037a197cb50b42468694de59c0bdd9b1:zLgSQ9DTJAXpkk6jZXuDYGie3KrZ7Kh7Xsp49u3cveU=:eyJCdWNrZXQiOiJ5bXVzaWMiLCJSZWdpb24iOiJIWiIsIk9iamVjdCI6IkVhQUNIeGdjMWlfNWFkbkZjeTEzdEE9PS81MDk5NTExNjMzMDQyNDIyMDEiLCJFeHBpcmVzIjoxNjkyNDU0MTY4fQ=="
  },
  "referrer": "https://music.163.com/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": null,
  "method": "POST",
  "mode": "cors",
  "credentials": "omit"
});

<?xml version="1.0" encoding="UTF-8"?>
<InitiateMultipartUploadResult>
  <Bucket>ymusic</Bucket>
  <Key>EaACHxgc1i_5adnFcy13tA==/509951163304242201</Key>
  <UploadId>6924469692300594086</UploadId>
</InitiateMultipartUploadResult>
fetch("https://ymusic.nos-hz.163yun.com/EaACHxgc1i_5adnFcy13tA==/509951163304242201?partNumber=1&uploadId=6924469692300594086", {
  "headers": {
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6",
    "sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "cross-site",
    "x-nos-token": "UPLOAD 037a197cb50b42468694de59c0bdd9b1:zLgSQ9DTJAXpkk6jZXuDYGie3KrZ7Kh7Xsp49u3cveU=:eyJCdWNrZXQiOiJ5bXVzaWMiLCJSZWdpb24iOiJIWiIsIk9iamVjdCI6IkVhQUNIeGdjMWlfNWFkbkZjeTEzdEE9PS81MDk5NTExNjMzMDQyNDIyMDEiLCJFeHBpcmVzIjoxNjkyNDU0MTY4fQ=="
  },
  "referrer": "https://music.163.com/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "ID3\u0003\u0000\u0000\u000000\u0000\u0001¤\u0000\u0000\u0000 \u0000\u00004\u0000\u0000\u0004LAME3.99.5UUULAME3.990·····················001Ó$dÌûpÙ1",
  "method": "PUT",
  "mode": "cors",
  "credentials": "omit"
});

HTTP/1.1 200 OK
Date: Sat, 19 Aug 2023 12:09:43 GMT
Content-Type: application/octet-stream
Content-Length: 0
Connection: keep-alive
x-nos-request-id: 3d73df78-a932-48c1-88b5-f658bc42947f
x-nos-requesttype: UploadPart
Access-Control-Expose-Headers: etag
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,POST,OPTIONS,PUT,DELETE
ETag: a22b76bc3ae07e3cac1a65ddaff4df2b
Server: nos/v1.0.2
@Binaryify
Copy link
Owner

Binaryify commented Aug 24, 2023

可以给我个cookie测试下吗,qq私发我
或者你拉下代码,试试 /audio_upload.html 这个页面

@nooblong
Copy link
Contributor Author

我qq 180128877,刚账号被风控了。。。还需要吗

@Binaryify
Copy link
Owner

你先自己试试 /audio_upload.html

@nooblong
Copy link
Contributor Author

上传可以用,可以去解密一下上传后的提交接口吗,我这个unblockNeteaseMusic好像今天出问题了,
image
应该是这些接口
https://interface.music.163.com/weapi/voice/workbench/voice/batch/upload/preCheck?csrf_token=055120bba7694c3328379b3110b0507f

https://interface.music.163.com/weapi/voice/workbench/voice/batch/upload/v2?csrf_token=055120bba7694c3328379b3110b0507f

@Binaryify
Copy link
Owner

是不是你nodejs切换版本降级了
最好还是提供下抓包数据
我账号没申请达人,弄不了

@nooblong
Copy link
Contributor Author

加我qq吧发cookies你 nondanee/UnblockNeteaseMusic#846 别人也遇到这个问题了

  1. ------------------------点击立即发布后------------------------

  2. https://interface.music.163.com/weapi/feedback/weblog?csrf_token=055120bba7694c3328379b3110b0507f

```js
fetch("https://interface.music.163.com/weapi/voice/workbench/voice/batch/upload/preCheck?csrf_token=055120bba7694c3328379b3110b0507f", {
  "headers": {
    "accept": "application/json",
    "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6",
    "content-type": "application/x-www-form-urlencoded",
    "sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-site"
  },
  "referrer": "https://music.163.com/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "params=9Vl8IAphnNplmZP%2Bjr%2FLK8fy7Zq143Gr2eIyglcrmplBgmW%2FwjZg%2Fg6asY08525y%2Ba0chBS5sfImfuQQs1MuX4v1PPUsfi8D6KlfrT%2FKi%2Bas458UN0Jk5eregC0TG6gDB2PJ0ETMEnLTw62SSILKh8pjXkoJgQ3GLShDWveZsu5tkVNIqSwh%2B%2BOsWAFOpCkeWHkMqkV47wQAYggOXVcRXdQcwtBTel2rwEOhMTT3hw%2Bjut716f26aFaNNUrJZ7HjQAfwwlHN5RcwT6VMbLwCLKZfMOKm6w4CvfnhdM%2BK8RAVLw0uK2%2BjurITwL2qR8QW8IOLoj9AKjjnpOSwmDbQe3eo5r2ZRTVCvqlHbzV1N%2FDU7vfqJwdpYV5cL3%2Fq8puj13sIu77CJ55wM%2FdMEjHSf3gTevfYn4CUHYR8hexbbl%2F0y%2FXW%2FdxeYmbb1ny3YLyzugPkzOc7uQx9jlD0FgznTele5PEIDM5%2FXyQFaP5rTSH%2FCLa3xusE2wXF17wb8yqy7zH6HVTgeGML%2Fn08ucXl2X5FBVxl6k46ASUQzq8fMEIM6JPlnKYNngd1wpheBpG%2BCnCNns72ap9hLoco5a7m13r5ZfRobdHRkQP7j%2BqUGed19zdoX%2Fvv1HkC399K7lrNh6xKNndGw%2FXnvhMKN9E5pS29T2m8o57z1dV0qLQvBEemLzn%2Bh3EtY0XVrny%2FcFXk%2Bo%2BuqqDyAjg73s4sxNLRxJHx45cAInnVa9hI7ayGya%2BZbTQtxHw2n7ifP8uJpVHzFhzyaWpwKq7snW%2BRw1uMLvJA40OyiHIUiWufNxgISi2kCcBWVuOVFYaNL5EDDxib4TvZzpTK4CsH9U1sWkdGry1BITSa9lbIAPSyiyCjjRjbTn9HiOVq5JCaeOvgTbUBgs3qa49reZdp8e880bGm9fEIeY4hQUqyJe%2FwwCpmBlxblXbJZF29IVtWGGLgmSwGk%2BGQVd%2FukJEl5lus%2BehfB%2FhhbCUnsVT49nDndHqYwCfsNvgGodyG7foSgLzJcijxHHOy85ZJDqqho9CVsUYvH%2FMHS89Eocm%2BS07W2cAPtrQ%3D&encSecKey=c7574214326be3ab0b67053d9f229daa91676501fb70cfca7111dc19500cf04fe5bd248b241e0f822dc1c4cd0ab0a1dfebb8a2e7cb4e8e8d45eba3dd9285b7b1c69966b94151916d490da1a8f20929a1a67e630159848cfea5a20f22eed8173f00a92711e969422cf0f2832107581a159f1a193955fab6a8fc57ae2dc460d493",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

{"code":200,"data":true,"message":""}
```
```js
fetch("https://interface.music.163.com/weapi/voice/workbench/voice/batch/upload/v2?csrf_token=055120bba7694c3328379b3110b0507f", {
  "headers": {
    "accept": "application/json",
    "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6",
    "content-type": "application/x-www-form-urlencoded",
    "sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-site"
  },
  "referrer": "https://music.163.com/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "params=dYB%2BfUlh0TBeCbnI52UlA3ELJAl87BshAyTqbsa8DHaYt7uRz9QEmLSN%2BDamZ7k%2FGlgzll2tKVGO9FfmhTkuokiicKFdGBTqW%2BVJ%2BskbMDuFoc78v%2BaJ24sSyoEw5SZnTDR4Tqq1lEk%2B4b1sHLgDZH2PnqI1gZhJnbu9XEz143GZdPrBg3qMD9gPzoF%2BS7JKUzIvgqs1%2BYHXvtOjxY23Ivfu37u9rTA7abBfDvgI9otPNlNy0km1WyiZIVERI7allIl3dy2OmSpzeIdxyyvB42mGP4bI91tXO%2FcKAdIx6fzUJQMGTyKyu%2Bs%2FdoUgv%2BLoeskEiqeAj4BlN2Wxcfh52bfpwnHBp%2Fna10bnUomnlBSZSxT6xwDcqVDZg8cndoRBVD6QKsQYYjqXSUv0g2hmIfR1K%2B9I%2FqgPxyqR3O8XjSJdUC2G40ifb7f%2Bx0vlxZgwdMkc4912uQfpCGSCNehTx725GZ%2Fvc7Nn3DkCXlO3TLnRdkQqlxTyU2bCdhxHnQIjkrCQArLnJUGdMR4km4z0TfoNx%2FdexmJIRyCmtWuxw8jhhgx%2FOGe3Qq7vJFzRmP%2F72RMl4mMrlGGESJFY7suE6J1rSfu5uhqSxw4lm2bXP49ioWnh6dZntZ3SxBatYzR5Y9Sfg4IV8pYn6RjvvY9qdXKJJSeT6StRZBf7N88UqiMxWuqgYVZkqGMIsgwKy6RvLaAykhT%2BqcdRVImYRZjlvzZ4vIlcz4EyHIUAfPESsXYsdLUqSKBdc70QfMvfeeTMYW0H310S4wFJxkpKLZ79Qf80mS4vTjoS5Rsu1eHjk8JSbIf1YIYk5bxSP7nz5FhNgSyKkj6kNflALq3iGYE3LBI0hLW2yhskvDZGAniIx4EppiYls7hkS2Z8Dbg1YE2HXYrlWTSDh5hEQENHbH%2B%2BOEOAvCFTikX%2B0HKSaI2Ed5MFyD6ukXyjBAEMqe1xNma1xFEdx%2BpZtoISEuMUsuQ8SzaKZfgAnU8jxC60AwrsyEj6YTdCwwvJurrrFJQ5ahVaHmSzDMbbuIJEp%2BwIekYWrFpTHnN8C0Uy8twHF%2FXM43o%3D&encSecKey=8025594e0e8b1c50403641a224a11e352a80f1742f20cfa22aa5d01e41d26d02ded56ac5461dddcf6dfdb3f6d7803ce2be927d65936a6ad5f66a3b945cd5064d9aaf7d8cfe96c4f6bfed82e9ea35ad705de2f8d2feabffde8047cd4437855d17a295f49c957d99881fe612243f82835393a6662307bf78ae01e59319a9b13259",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

{
  "code": 200,
  "data": [
    2527846569
  ],
  "message": ""
}
```
  1. collect weblog weblog weblog weblog?csrf=...

```js
fetch("https://interface.music.163.com/weapi/voice/workbench/voices/by/voicelist?csrf_token=055120bba7694c3328379b3110b0507f", {
  "headers": {
    "accept": "application/json, text/javascript",
    "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6",
    "content-type": "application/x-www-form-urlencoded",
    "sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-site"
  },
  "referrer": "https://music.163.com/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "params=TsKwcG1cNvdjZxWJGCOTXF6taN2yTaQPvhfIJrAT%2F5CBjfCDjc2haZ7T7uFUfChf%2FaTiNWWL71APn1ZyYH9BVC20eQmP0mnDKjqSv2jM8mqoosywGNDQNkDMDEZMCDRVIn%2BXGOtqtB5Izx%2F%2FA3XH4Hv6SqWslJMlX4wnukFvwVkBdgyHHo2P%2BXf8TLHjmODk&encSecKey=8e5f5751b695a255c52eb194cca7a4b064ab8f0bd0644fc0c3349e7a5c159e4630160adaf02b9a291cdc7b6250de8514c5b0f36da69bfe4684aba27ea97bb8d6e7667d755c7be9e0a5a3f1a8496dc40dfae82b416f88c949ade03f09e4808bfb2728013e74be350885edd053f7723a017edde35027e3743fc9a95ed3234cc587",
  "method": "POST",
  "mode": "cors",
  "credentials": "include"
});

{
    "code": 200,
    "message": null,
    "data": {
        "total": 1,
        "list": [
            {
                "voiceId": 2527846569,
                "voiceName": "标题测试",
                "publishTime": 1692448635484,
                "trackId": 2075143768,
                "privacy": false,
                "coverUrl": "http://p1.music.126.net/aKpEbGmTmOIqS9HysWG9mg==/109951168307804792.jpg",
                "coverImgId": "109951168307804792",
                "createTime": 1692448635484,
                "playCount": 0,
                "duration": 151656,
                "userId": 51363580,
                "userName": "yulyl",
                "displayStatus": "AUDITING",
                "programFeeType": null,
                "deleteToast": {
                    "title": "特别提醒",
                    "content": "当前声音删除后将无法恢复,当前声音数据也将清零,您确认要删除吗?"
                },
                "radioName": "90f6f8e5-9cf1-41ba-b665-f1c2564650b6",
                "commentCount": 0,
                "programPrice": null,
                "tasteDuration": null,
                "rejectReason": null
            }
        ]
    }
}
```
  1. ?

    fetch("https://interface.music.163.com/weapi/voice/workbench/voicelist/detail?csrf_token=055120bba7694c3328379b3110b0507f", {
      "headers": {
        "accept": "application/json, text/javascript",
        "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6",
        "content-type": "application/x-www-form-urlencoded",
        "sec-ch-ua": "\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\"",
        "sec-ch-ua-mobile": "?0",
        "sec-ch-ua-platform": "\"Windows\"",
        "sec-fetch-dest": "empty",
        "sec-fetch-mode": "cors",
        "sec-fetch-site": "same-site"
      },
      "referrer": "https://music.163.com/",
      "referrerPolicy": "strict-origin-when-cross-origin",
      "body": "params=JjTF2VZl%2BfjmnLFrY3bzeE4hHXb2si11Ckyja8AgTv398IW%2FVEXs4kzbtRyZJwosWpuC8HWzJ%2FmVSSmevUJwquEPt33RyDOXOoUEx9jdH7GyOE%2Bj9XTKE85K5c5XVGAqbdItdnmBAU2hM%2BkonZaWWg%3D%3D&encSecKey=6152d7e885647fb45782f2381a38226a2afddc2a5b6a3ba44ed7c2fe4464786220bb6e75d6d606a138b48ffe440f1777b5d39fe97581e16543f3b50add74ec49ed90bb84a3f54bb7a57c4c24948e8fd7f9269dd3d74ffa1fc9c41efa4588ac6a608908539e0e3efde7663f6ae83522dd9c6757e79d5478aebd0ba90ad1ff8ccc",
      "method": "POST",
      "mode": "cors",
      "credentials": "include"
    });
    
    {
        "code": 200,
        "message": null,
        "data": {
            "voiceListId": 985711275,
            "voiceListName": "90f6f8e5-9cf1-41ba-b665-f1c2564650b6",
            "coverUrl": "http://p1.music.126.net/aKpEbGmTmOIqS9HysWG9mg==/109951168307804792.jpg",
            "coverImgId": "109951168307804792",
            "categoryId": 3,
            "categoryName": "情感",
            "secondCategoryId": 469052,
            "secondCategoryName": "情感故事",
            "lockCategory": false,
            "description": "13b9d584-70d1-4c5e-b3dd-3c2f4cd77201",
            "voiceCount": 0,
            "createTime": 1676302607489,
            "privacy": false,
            "unlockCode": null,
            "order": 1,
            "fee": null,
            "feeMode": null,
            "modules": "[{\"type\":3,\"title\":\"播客内容简介\",\"detail\":[{\"type\":1,\"id\":0,\"content\":\"13b9d584-70d1-4c5e-b3dd-3c2f4cd77201\",\"height\":null,\"width\":null}]}]",
            "coverSource": 2,
            "rssId": null,
            "rssLink": null,
            "rssStatus": null,
            "rssUpdateTime": null
        }
    }

@Binaryify
Copy link
Owner

image
可以把app.js这个httpdns去掉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants