Lots of people asking for reward calculations but almost nobody explaining to OP how a programmer can write this kind of thing
But I need more information about how you want to use it because I'm not sure if you really need a webpage for this... What you are searching for is called youtube-dl, you can download the mp3 audio from any video with this command line:
~snip
D'oh! I wish I saw the npm earlier because I had made a (subpar) bare-bones wrapper around youtube-dl in Nodejs for a previous project. It would've saved me a lot of time.
Several weeks ago, I was trying to make such a webpage (you do
not have to code an entire website for this!), only for converting into video formats instead, and the biggest problem for me was coding the buttons, the headers and all into something that doesn't look like it was made in 1995, as I suck at web design.
Again folks, this should be a ridiculously easy task for anyone who knows basic web design and some other programming language and should take at most a week to do. All you have to do is make the button send an XMLHTTPrequest to some REST API running with Flask and Flask-RESTFUL in Python or the equivalent library in the programming language you want to use, make the REST API listen on the static IP address of the server, have the server side code running on the VPS run the youtube-dl program and optionally serve the video file on the VPS using Apache or nginx if you want to download the video to your devices instead of leaving it on your server.
Dude, to convert YouTube videos to mp3 format you needn't to use scripts
If OP's internet connection is horrible then youtube-dl's never going to finish since it doesn't have a continue option IIRC (I have worked on the codebase) and Google keeps changing the raw video URLs every 2 hours or so, so I see some benefit in downloading it onto a fast VPS and then finding some way to transfer it to the client without SSH'ing into it first, where downloads can be resumed.
Or maybe you go on vacation, and it's not possible to run youtube-do on a phone or tablet. Not everyone wants to lug a laptop around with them