downloader

package
v0.0.0-...-76ae43c Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyData = make([]Datum, 0)

EmptyData empty data list

Functions

func Download

func Download(v Datum, stream string, path string) error

Download download data

func PrintToPDF

func PrintToPDF(v Datum, cookies map[string]string, path string) error

PrintToPDF print to pdf

func Save

func Save(
	urlData URL, fileName string, bar *pb.ProgressBar, chunkSizeMB int,
) error

Save save url file

Types

type Data

type Data struct {
	Title string  `json:"title"`
	Type  string  `json:"type"`
	Data  []Datum `json:"articles"`
}

Data 课程信息

func (*Data) PrintInfo

func (data *Data) PrintInfo()

PrintInfo print info

type Datum

type Datum struct {
	ID      int    `json:"id"`
	Title   string `json:"title"`
	Type    string `json:"type"`
	IsCanDL bool   `json:"is_can_dl"`

	Streams map[string]Stream `json:"streams"`
	// contains filtered or unexported fields
}

Datum download information

type Stream

type Stream struct {
	URLs    []URL  `json:"urls"`
	Size    int    `json:"size"`
	Quality string `json:"quality"`
	// contains filtered or unexported fields
}

Stream data

type URL

type URL struct {
	URL  string `json:"url"`
	Size int    `json:"size"`
	Ext  string `json:"ext"`
}

URL for url information

type VideoMediaMap

type VideoMediaMap struct {
	Size int `json:"size"`
}

VideoMediaMap 视频大小信息

Jump to

Keyboard shortcuts

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