gotubedl

package module
v0.0.0-...-2704f02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2023 License: Unlicense Imports: 11 Imported by: 0

README

gotubedl

Gotubedl is a Golang package used to download videos from YouTube.

Features

  • Support for downloading videos from YouTube.
  • Download videos in various formats (MP4, MKV, MOV, MP3, M4A, AAC, FLAC, Opus, etc.).
  • Choose video quality.
  • List and preview videos.
  • Adjust download speed.
  • Split videos into parts during download.
  • Save various metadata during download.

Installation

To install Gotubedl, use the following command:

go get github.com/Alsond5/gotubedl

Usage

To use Gotubedl, use the following code:

yt, err := gotubedl.Init("https://www.youtube.com/watch?v=un6ZyFkqFKo")

if err != nil {
    fmt.Println(err)
    return
}

yt.Streams().GetHighestResolution().Download("", "", 15)

Help

To see Gotubedl's help menu, use the following command:

gotubedl -h

Development

Gotubedl is developed as an open-source project on GitHub. To contribute, follow these steps:

  1. Fork it.
  2. Make changes.
  3. Run tests.
  4. Send a pull request.

License

Gotubedl is licensed under The Unlicense.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Playlist

type Playlist struct {
	PlaylistUrl string
	// contains filtered or unexported fields
}

func InitPlaylist

func InitPlaylist(url string) *Playlist

func (*Playlist) GetVideos

func (p *Playlist) GetVideos() []*YouTube

func (*Playlist) Html

func (p *Playlist) Html() string

func (*Playlist) Results

func (p *Playlist) Results() []SearchQuery

type SearchQuery

type SearchQuery struct {
	Url        string `json:"url"`
	Title      string `json:"title"`
	Thumbnail  string `json:"thumbnail"`
	LengthText string `json:"lengthText"`
	Author     string `json:"author"`
}
func Search(query string) ([]SearchQuery, error)

type YouTube

type YouTube struct {
	Url string

	VideoId   string
	Title     string
	Length    int
	Author    string
	ViewCount int
	// contains filtered or unexported fields
}

func Init

func Init(url string) (*YouTube, error)

func (*YouTube) BasejsContent

func (y *YouTube) BasejsContent() (string, error)

func (*YouTube) BasejsFunctions

func (y *YouTube) BasejsFunctions() []string

func (*YouTube) BasejsUrl

func (y *YouTube) BasejsUrl() string

func (*YouTube) Html

func (y *YouTube) Html() string

func (*YouTube) Js

func (y *YouTube) Js() map[string]interface{}

func (*YouTube) Streams

func (y *YouTube) Streams() *query.StreamQuery

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL