site

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSiteChanged  = errors.New("site structure changed")
	ErrRateLimited  = errors.New("rate limited")
	ErrAuthRequired = errors.New("authentication required")
	ErrNotFound     = errors.New("album or file not found")
)

Functions

func IsAuthRequired

func IsAuthRequired(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func IsRateLimited

func IsRateLimited(err error) bool

func Register

func Register(s Site)

Types

type Album

type Album struct {
	ID        string
	Name      string
	Files     []File
	PostLinks []string
}

type DownloadRequest

type DownloadRequest struct {
	URL     string
	Headers http.Header
	Cookies []*http.Cookie
}

type File

type File struct {
	ID   string
	Name string
	Size int64 // -1 if unknown
}

type Site

type Site interface {
	Name() string
	Match(url string) bool
	Resolve(ctx context.Context, url string, password string) (*Album, error)
	DownloadRequest(ctx context.Context, file File) (*DownloadRequest, error)
	DefaultConcurrency() int
	DefaultResolveDelay() time.Duration
	DefaultDownloadDelay() time.Duration
}

func List

func List() []Site

func Match

func Match(url string) Site

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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