https://your-deployment.vercel.app/<YT-ID>/<Filename>.mp3
Where <YT-ID>
is the youtube video ID, and <Filename>
is the default name of the file.
<Filename>
can be anything because the purpose of this is to customize the audio's default filename when downloading.
Note that .mp3
is required.
If you are using vercel, use this as vercel.json
:
{
"version": 2,
"builds": [{
"src": "download.py",
"use": "@vercel/python"
}],
"rewrites": [{
"source": "/(.*)",
"destination": "/download.py"
}]
}
If not, you should follow this rewrite rule:
- Everything (
/(.*)
) should be redirected to the python script.