services

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient() *http.Client

return the client carrying the token

Types

type Comic

type Comic struct {
	Title string
	Pages []Page
}

type Config

type Config struct {
	Cookie  string   `mapstructure:"cookie" json:"cookie"`
	OutPath string   `mapstructure:"outPath" json:"outPath"`
	Limit   int      `mapstructure:"limit" json:"limit"`
	Urls    []string `mapstructure:"urls" json:"urls"`
}

func (*Config) LoadConfig

func (c *Config) LoadConfig(path string)

type Page

type Page struct {
	Name    string
	Total   int
	PageUrl string
	Urls    []string
}

type ZeroDownload

type ZeroDownload struct {
	Client  *http.Client
	Cookie  string
	OutPath string
	Limit   int
}

func (*ZeroDownload) DownloadComic

func (zd *ZeroDownload) DownloadComic(urls []string)

func (*ZeroDownload) DownloadImage

func (zd *ZeroDownload) DownloadImage(url, path string, retry *int)

func (*ZeroDownload) DownloadPage

func (zd *ZeroDownload) DownloadPage(page Page, path string)

func (*ZeroDownload) GetComicPageInfo

func (zd *ZeroDownload) GetComicPageInfo(url string) *Comic

func (*ZeroDownload) Requert

func (zd *ZeroDownload) Requert(url string) (*http.Response, error)

Jump to

Keyboard shortcuts

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