Flask YouTube Audio Downloader
YouTube video downloader is one of the easiest and beginner friendly project to do during learning of python and Flask. Today we will up a…

YouTube video downloader is one of the easiest and beginner friendly project to do during learning of python and Flask. Today we will up a game little and make an API with flask that sends audio file in response
Make virtual environment in anacondaconda create --name yt-downloader pythonconda activate yt-downloader
Installing required libraries
We will be installing flask framework for parsing and getting web requests, youtube-dl library for getting official video URL and downloading to server side and flask-cors for handling cross site origin resource error that appears when we fetch data from third party websites.pip install flask
pip install youtube-dl
pip install flask-cors
Flask initial setup
app.py
Implementation
Now let's improve on to above code and write that actually downloads the audio
See it working
This project is hosted in https://yt.caretsys.tech/