Skip to content

Te-cho/go-youtube-dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go-Youtube-dl

A GoLang library for downloading youtube subtitles and meta data using the known Youtube-dl application.

Go-youtube-dl logo



Features

  • Usage of the famous known application Youtube-dl .
  • Optional placeholder interpolation

Requirements

  • Go 1.2 or higher
  • Youtube-dl application to be installed on your server or whatever the machine running the Go code.

Installation

Simple install the package to your $GOPATH with the go tool from shell:

$ go get github.com/youtube-videos/go-youtube-dl

Make sure Git is installed on your machine and in your system's PATH.

Usage

Example of usage is as follow:

ytdl := youtube_dl.YoutubeDl{}
ytdl.Path = "$GOPATH/src/app/srts" // for example
err := ytdl.DownloadVideo(video.Id)
if err != nil {
    log.Printf("%v", err)
}

Then you can handle the downloaded file in the specified path.


License

Go-Youtube-dl is licensed under the Mozilla Public License Version 2.0

Mozilla summarizes the license scope as follows:

MPL: The copyleft applies to any files containing MPLed code.

That means:

  • You can use the unchanged source code both in private and commercially
  • When distributing, you must publish the source code of any changed files licensed under the MPL 2.0 under a) the MPL 2.0 itself or b) a compatible license (e.g. GPL 3.0 or Apache License 2.0)
  • You needn't publish the source code of your library as long as the files licensed under the MPL 2.0 are unchanged

Please read the MPL 2.0 FAQ if you have further questions regarding the license.