Documentation ¶
Index ¶
- Constants
- func DirectoryName(p kemono.Post) string
- func NewDownloader(options ...DownloadOption) kemono.Downloader
- type DownloadOption
- func Async(async bool) DownloadOption
- func BaseURL(baseURL string) DownloadOption
- func MaxConcurrent(maxConcurrent int) DownloadOption
- func MaxSize(maxSize int64) DownloadOption
- func MinSize(minSize int64) DownloadOption
- func OverWrite(overwrite bool) DownloadOption
- func RateLimit(n int) DownloadOption
- func Retry(retry int) DownloadOption
- func RetryInterval(interval time.Duration) DownloadOption
- func SavePath(...) DownloadOption
- func SetLog(log Log) DownloadOption
- func Timeout(timeout time.Duration) DownloadOption
- func WithHeader(header Header) DownloadOption
- type Header
- type Log
Constants ¶
View Source
const ( UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" Accept = "" /* 135-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func DirectoryName ¶
func NewDownloader ¶
func NewDownloader(options ...DownloadOption) kemono.Downloader
Types ¶
type DownloadOption ¶
type DownloadOption func(*downloader)
func MaxConcurrent ¶
func MaxConcurrent(maxConcurrent int) DownloadOption
MaxConcurrent set the max concurrent download
func MaxSize ¶ added in v0.0.2
func MaxSize(maxSize int64) DownloadOption
MaxSize set the max size of the file to download
func MinSize ¶ added in v0.0.2
func MinSize(minSize int64) DownloadOption
MinSize set the min size of the file to download
func Retry ¶
func Retry(retry int) DownloadOption
func RetryInterval ¶
func RetryInterval(interval time.Duration) DownloadOption
func WithHeader ¶
func WithHeader(header Header) DownloadOption
Click to show internal directories.
Click to hide internal directories.