https://github.com/vr-enhanced-learning/download-youtube-video
Download YouTube videos with JS
https://github.com/vr-enhanced-learning/download-youtube-video
docker download hop js video wrapper youtube youtube-dl
Last synced: 9 months ago
JSON representation
Download YouTube videos with JS
- Host: GitHub
- URL: https://github.com/vr-enhanced-learning/download-youtube-video
- Owner: vr-enhanced-learning
- Created: 2023-04-25T23:42:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-26T05:45:57.000Z (over 2 years ago)
- Last Synced: 2025-01-15T18:24:53.595Z (11 months ago)
- Topics: docker, download, hop, js, video, wrapper, youtube, youtube-dl
- Language: JavaScript
- Homepage: https://download-youtube-video.hop.sh/
- Size: 34.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Download YouTube videos with JS
This is a simple REST API built on ExpressJS that allows you to download YouTube videos by their ID.
## Installation
To install and run this application, you will need to have Node.js and Docker installed on your machine.
1. Clone this repository to your local machine.
1. Run `docker build -t youtube-downloader .` to build the Docker image.
1. Run `docker run -p 3003:3003 youtube-downloader` to start the container.
The API should now be accessible at http://localhost:3003.
## Usage
The API has two endpoints:
### Home
`GET /`
This endpoint returns a simple message indicating that the API is online.
### Download
`GET /download/:id`
This endpoint takes a YouTube video ID as a parameter and downloads the video. The video is then returned as the response. If the video cannot be downloaded, an error message will be returned instead.
Example request:
```
GET http://localhost:3003/download/dQw4w9WgXcQ
```
## Notes
- This application uses the `nikolaik/python-nodejs` image from Docker Hub, which includes both Python and Node.js. This is because the application uses a Python package called `youtube-dl` to download the videos.
- By default, the application will download the highest quality version of the video available. If you want to download a specific version, you can pass additional options to the `youtube-dl` command. For more information, see the `youtube-dl` documentation.
- This application is intended for personal use only. Downloading copyrighted material may be illegal in your country.