A simple Django website that lets you watch and download videos from YouTube. It integrates such services as Docker, Nginx, Celery, RabbitMQ, Memcached and MySQL database.
It utilizes cron jobs to clear old files and entries.
You can also set up an SSL certificate for your website if you attach it to a domain name using Certbot.
-
YouTube video downloading functionality
-
Real-time progress bars:
- A progress bar gets smoothly updated using the information retrieved from the module used to download video files.
-
Automated deletion of old video files:
- A custom Django
manage.pycommand was implemented to clear up old files and entries. It is being triggered by a shell script that gets executed by cron.
- A custom Django
-
File logging system:
- Logs from the website, Nginx, RabbitMQ are agregated in the
logsfolder of the project.
- Logs from the website, Nginx, RabbitMQ are agregated in the
-
SSL support:
- The project provides an ability to set up an SSL certificate for a website if it is connected to a domain name (using the Let's Encrypt certs).
First, you will need to clone the project in your working folder:
git clone https://github.com/mykdolnyk/yt-downloader-website.git
cd yt-downloader-websiteEnsure that you have Docker and Docker Compose installed on your system. Then, head to the project folder so you can run the project:
docker compose upBy default, the project is using the preconfigured test.env file, but it is strongly encouraged to change it if you decide to deploy the project online.
ℹ️ Note: If you encounter the
Sign in to confirm you’re not a boterror when trying to download a video, then you should add your cookies to theytdlp_cookies.txtfile. You can retrieve them using the official yt-dlp guide.
In case you decide to host your project using the DB in the container, but you find the MySQL DB too heavy on memory, you can use the psql branch instead. It is updated to match the state of the main branch, so there should be no issues using it.
To do so, clone the project this way:
git clone --branch psql https://github.com/mykdolnyk/yt-downloader-website.git
cd yt-downloader-websiteFeel free to proceed with further steps afterward.
You can set up a free SSL certificate for your domain name using a Certbot. However, it requires a bit more manual setup.
You should modify a few lines of code before starting the project.
Keep in mind that you still need to configure the nginx/default_ssl.conf file as usual to make it work with SSL.
Once that is done, you can run the project using the following command:
docker compose -f compose_ssl.yml up