The audio src, of the vkey obtained by QQ Music API can be played normally at the beginning, and it is 403 today. Excuse me, how can we be normal?

follow teacher Huang Yi"s VUE course QQ Music APP. To make a music player, the interfaces are all qq.
now that the playlist data is available, you need to click on the song to play it. You are going to use the audio tag to achieve it. But I don"t know how to generate the src of the audio tag. The src approach in the course has expired. Go to QQ and see their src is like this

http://dl.stream.qqmusic.qq.com/C400001uxKNp3a7Qkv.m4a?vkey=72E3CE808E6EB2FEBE2AA5A625DE5C12468604025CC9F05A0D0ADD898CB77FDF83888D29BEE6097761F53DE1C82B7DDB7A67AD38DD15517B&guid=504753841&uin=0&fromtag=66

click on a few songs and compare and analyze the src, and find that the src has the following parameters:
1.C400001uxKNp3a7Qkv
2.vkeyword 7F4E18EEF24DFC
3.guid parameter
4.uin parameter
5.fromtag parameter
but the variables are only 1 and 2.
it"s easy to generate 1. The mid in the resulting data object is C400.

clipboard.png

vkeyQQ

:

clipboard.png

url:


clipboard.png

clipboard.png
vkey

QQjsonp

clipboard.png

param()dataurloriginJSONP()jsonp

clipboard.png

I got vkey. when I got what I wanted. Stitched together with the variable mid, they are 1, 3, 4 and 5, put them into vuex"s state, and use state directly in src.
the song is played normally when it is clicked at first. But then there was a 403 error

compare the two src versions of the same song with the official version of QQ, except that vkey is different, everything else is the same, vkey is randomly generated, it is normal to be different.

official src

http://dl.stream.qqmusic.qq.com/C400001uxKNp3a7Qkv.m4a?vkey=71FF9880454604D580A3B64BD664EEE92069E28F42780C2F2DCE3F6A26C6ECB30ED4E790833E580AA1D3943928049747691A9758158917A9&guid=504753841&uin=0&fromtag=66

my src

http://dl.stream.qqmusic.qq.com/C400001uxKNp3a7Qkv.m4a?vkey=1373FD715FCE0AFB7580063C280CEE6945E3DC2E8D52CEE4567BD92E5EA78C1807D9730D34A8F592A7E096D2EF9FAB927921B4BD4FD357DA&guid=504753841&uin=0&fromtag=66

the question now is:
1. Why can"t it play steadily? Later on 403, what strategy did QQ take to block my src? (Oh, I have a terrible headache. I got better when I copy my src just now.)

Mar.17,2021

I just made it yesterday, but I replaced it today. I'm very angry.

problem solved
use another API, do not simulate to request these troublesome steps, directly take ID to GET
fromtag=32" rel=" nofollow noreferrer "> http://isure.stream.qqmusic.q.
, the C100 in the middle is self-contained, and then add what you get. Of course, it is not guaranteed to be valid all the time.
there are some resources that are not clear why they are still in 403 status

I hope I can help you. If it is useful, you can also give me a compliment.


answer on June 6, 2018:
the method upstairs, given a fixed vkey, has been used before, but later found that it seems to be valid for only one day, so we look for a new solution.
was inspired by this answer: https://zhuanlan.zhihu.com/p/.
observed the request on the website and found that each song had its own vkey,

.

clipboard.png

vkey
singer-detail.vue


singer.js


song.js


guid




2018.4.18

@

clipboard.png

qq: fromtag=38" rel="nofollow noreferrer">http://dl.stream.qqmusic.qq.c...
guid vkey ,uid

:




ws



34~ QQ



qqurl


I also made a version of address
a few months ago and recently found that the interface has changed

.

as for the interface upstairs that says how to find it, just open y.qq.com in the browser and switch to mobile browsing mode to see the console. It's very simple. At that time, I found only a few pages. Where the interface is needed is easy to see. Generally speaking, QQ Music player is relatively simple.


ask how guid and vkey are added? Where did you get these two parameters? The


interface can not be used, does anyone have any interface that can be used


teacher Huang's project is updated to get QQ Music's vkey,?


find the method of getting vkey TAT

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32def-2ab92.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32def-2ab92.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?