Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
110 views
in Technique[技术] by (71.8m points)

javascript - How can I change URL format?

I am using ytdl-core and it provides this URL (audio):

https://r2---sn-gwpa-w5py.googlevideo.com/videoplayback?expire=1612552132&ei=ZEMdYNnJDumPz7sPyrSLmAw&ip=49.36.246.217&id=o-AFQLS1cSUJ6_bXBjMOIiWk1NuIYTMUTVu4rmliPZmJCS&itag=251&source=youtube&requiressl=yes&mh=VD&mm=31%2C29&mn=sn-gwpa-w5py%2Csn-gwpa-qxaz&ms=au%2Crdu&mv=m&mvi=2&pl=21&initcwndbps=225000&vprv=1&mime=audio%2Fwebm&ns=nxhNYqBZK92ToigY08JRZjEF&gir=yes&clen=230633&dur=18.961&lmt=1524503096692151&mt=1612530050&fvip=2&keepalive=yes&c=WEB&n=UIc0qqVvrMQOjPVkP&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAObqQA5vFYy6rJ3O3J4zswofNj2NFZOrwMF05p_PgWg9AiAmnde3njBRfvPmW_2VVA0YO1aLWQl0V3STGayuqgBRKA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgFTqy7Ng9zxhQY4GM4vP1BooPeHOf50PTikb59C67voACIGDybTTJBdLkp9lUx_-ZLdCulG_y3TH6iMhBbAn1AZR_&ratebypass=yes

But I want .mp3 at the end like this:

https://r2---sn-gwpa-w5py.googlevideo.com/13%20Beethoven%20-%20Fur%20Elise.mp3

I'd like .mp3 at the end.

Is this possible? I am using JavaScript Frameworks (NodeJS at the backend and React-Native at the front end).

question from:https://stackoverflow.com/questions/66064391/how-can-i-change-url-format

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

No, it isn't possible. Google decides what URLs to give their video and audio resources.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...