downloader

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 12 Imported by: 0

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, 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, chunkSizeMB int) error

Save url file

Types

type AudioMediaMap

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

AudioMediaMap 音频频大小信息

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"`
	ClassID   int    `json:"class_id"`
	Enid      string `json:"enid"`
	ClassEnid string `json:"class_enid"`
	Title     string `json:"title"`
	Type      string `json:"type"`
	IsCanDL   bool   `json:"is_can_dl"`
	M3U8URL   string `json:"m3u8_url"`

	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