This project is a simple web application that allows users to download YouTube videos by providing the video URL. The application is built using Go and the github.com/kkdai/youtube/v2
package.
- Fetch video information from YouTube
- Display available video formats
- Download selected video format
- Go 1.16 or later
-
Clone the repository:
git clone https://github.com/yourusername/youtube-get-video.git cd youtube-get-video
-
Install dependencies:
go mod tidy
-
Run the application:
go run cmd/web/main.go
-
Open your web browser and navigate to
http://localhost:8080
.
cmd/go-youtube-download/main.go
: Entry point of the application.internal/youtube/client.go
: Contains the YouTube client setup and functions to fetch video information and streams.internal/handlers/validate.go
: Contains the handler for validating and displaying video formats.web/templates/formats.html
: HTML template for displaying video formats.web/static/
: Directory for static files (CSS, JS, etc.).
This project is licensed under the MIT License. See the LICENSE file for details.