downloader

package
v0.0.0-...-e8169dd Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Caption

func Caption(url, refer, fileName, ext string)

Caption download danmaku, subtitles, etc

func Save

func Save(
	urlData URLData, refer, fileName string, bar *pb.ProgressBar,
)

Save save url file

Types

type FormatData

type FormatData struct {
	// [URLData: {URL, Size, Ext}, ...]
	// Some video files have multiple fragments
	// and support for downloading multiple image files at once
	URLs    []URLData
	Quality string
	Size    int64 // total size of all urls
	// contains filtered or unexported fields
}

FormatData data struct of every format

type URLData

type URLData struct {
	URL  string
	Size int64
	Ext  string
}

URLData data struct of single URL

type VideoData

type VideoData struct {
	Site  string
	Title string
	Type  string
	// each format has it's own URLs and Quality
	Formats map[string]FormatData
}

VideoData data struct of video info

func (VideoData) Download

func (v VideoData) Download(refer string)

Download download urls

Jump to

Keyboard shortcuts

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