website

package
v0.0.0-...-79b80c2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnknown .
	ErrUnknown errorCode = -1
	// ErrNotFound 404
	ErrNotFound errorCode = 404
)

Functions

func FindSubnumber

func FindSubnumber(r *regexp.Regexp, s string) int64

FindSubnumber .

func FindSubstring

func FindSubstring(r *regexp.Regexp, s string) string

FindSubstring .

func H

func H(reader *progressbar.Reader, hook WebHook) error

H .

func ReadAll

func ReadAll(fn func(data string) error) reader

ReadAll .

func ReadLine

func ReadLine(fn func(line string) (isBreak bool)) reader

ReadLine .

func ReadLineWithFile

func ReadLineWithFile(filename string) ([]string, error)

ReadLineWithFile .

func SetConcurrent

func SetConcurrent(c int)

SetConcurrent .

func Unmarshal

func Unmarshal(v interface{}) reader

Unmarshal .

func WriteTo

func WriteTo(w io.Writer) reader

WriteTo .

Types

type Link string

Link 链接

func (Link) Fetch

func (l Link) Fetch(fn reader, opts ...func(meta *Metadata)) error

Fetch .

func (Link) Joins

func (l Link) Joins(v ...string) Link

Joins .

func (Link) String

func (l Link) String() string

String .

type Metadata

type Metadata struct {
	Method string
	Header map[string]string
	Data   interface{}
	// contains filtered or unexported fields
}

Metadata .

type RsInfor

type RsInfor struct {
	// 所有者
	Owner string
	// 视频网站首页
	WebHome Link

	// 视频列表
	VideoList []*RsVideoHeader
	// contains filtered or unexported fields
}

RsInfor .

type RsResolution

type RsResolution struct {
	// contains filtered or unexported fields
}

RsResolution .

func NewResolutionRule

func NewResolutionRule(rule func(v string) int) *RsResolution

NewResolutionRule .

func (*RsResolution) Add

func (r *RsResolution) Add(v string)

Add .

func (*RsResolution) Best

func (r *RsResolution) Best() string

Best .

type RsVideo

type RsVideo struct {
	RsVideoHeader

	// HLink hls link
	HLink Link
	// Parts of video
	Parts []Link
	// contains filtered or unexported fields
}

RsVideo .

type RsVideoHeader

type RsVideoHeader struct {
	// 视频 ID
	ID string
	// 网页链接
	WebLink Link
}

RsVideoHeader .

type WebHook

type WebHook interface {
	// LinkList 视频列表
	LinkList() (*RsInfor, error)
	// VideoLink 根据视频网页链接,获取下载地址
	VideoLink(header *RsVideoHeader) (*RsVideo, error)
}

WebHook .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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