garage_jav

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const JAVBUS_URL = "https://www.javbus.com"
View Source
const JAVDB_URL = "https://www.javdb.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type CrawlConfig

type CrawlConfig struct {
	Proxy       string        `json:"proxy"`
	DestPath    string        `json:"dest_path"`
	RandomDelay time.Duration `json:"random_delay"`
	Parallelism int           `json:"parallelism"`
}

type JavMovie

type JavMovie struct {
	Code           string           `json:"code"`
	Title          string           `json:"title"`
	Cover          string           `json:"cover"`
	PublishDate    string           `json:"publish_date"`
	Length         string           `json:"length"`
	Director       string           `json:"director"`
	ProduceCompany string           `json:"produce_company"`
	PublishCompany string           `json:"publish_company"`
	Series         string           `json:"series"`
	Stars          string           `json:"stars"`
	Magnets        []JavMovieMagnet `json:"magnets" dataframe:"-"`
}

type JavMovieMagnet

type JavMovieMagnet struct {
	Name     string  `json:"name"`
	Link     string  `json:"link"`
	Size     float64 `json:"size"`
	Subtitle bool    `json:"subtitle"`
	HD       bool    `json:"hd"`
}

type JavbusCrawl

type JavbusCrawl interface {
	GetJavbusMovieByHomePage() ([]JavMovie, error) // 通过首页爬取对应的电影信息
	GetJavbusMovie() ([]JavMovie, error)           // 通过番号爬取对应的电影信息
	GetJavbusMovieByPrefix() ([]JavMovie, error)   // 通过番号前缀爬取对应的电影信息
	GetJavbusMovieByStar() ([]JavMovie, error)     // 通过演员ID爬取对应的电影信息
	GetJavbusMovieByFilepath() ([]JavMovie, error) // 访问文件夹下的视频列表爬取电影信息
	SaveLocal(infos []JavMovie) error
}

func NewJavbusCrawl

func NewJavbusCrawl(logger utils.Logger, opt *JavbusOption, config *CrawlConfig) (JavbusCrawl, error)

type JavbusOption

type JavbusOption struct {
	Code           []string `json:"code"`
	StarCode       []string `json:"star_code"`
	DownloadMagent bool     `json:"download_magent"`
	DownloadCover  bool     `json:"download_cover"`
	PrefixCode     []string `json:"prefix_code"`
	PrefixMinNo    uint64   `json:"prefix_min_no"`
	PrefixMaxNo    uint64   `json:"prefix_max_no"`
	PrefixZero     uint64   `json:"prefix_zero"`
	VideosPath     string   `json:"videos_path"`
	PageStartNo    uint     `json:"page_start_no"`
	OutPath        string   `json:"out_path"`
}

type JavdbCrawl

type JavdbCrawl interface {
	GetJavbusMovieByHomePage() ([]JavMovie, error) // 通过首页爬取对应的电影信息
	GetJavbusMovie() ([]JavMovie, error)           // 通过番号爬取对应的电影信息
	GetJavbusMovieByPrefix() ([]JavMovie, error)   // 通过番号前缀爬取对应的电影信息
	GetJavbusMovieByStar() ([]JavMovie, error)     // 通过演员ID爬取对应的电影信息
	GetJavbusMovieByFilepath() ([]JavMovie, error) // 访问文件夹下的视频列表爬取电影信息
	SaveLocal(infos []JavMovie) error
}

Jump to

Keyboard shortcuts

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