Documentation
¶
Index ¶
- Variables
- type JavLibraryConfig
- type Scraper
- func (s *Scraper) CanHandleURL(rawURL string) bool
- func (s *Scraper) Close() error
- func (s *Scraper) Config() *config.ScraperSettings
- func (s *Scraper) ExtractIDFromURL(urlStr string) (string, error)
- func (s *Scraper) GetLanguage() string
- func (s *Scraper) GetURL(id string) (string, error)
- func (s *Scraper) IsEnabled() bool
- func (s *Scraper) Name() string
- func (s *Scraper) ResolveDownloadProxyForHost(host string) (*config.ProxyConfig, *config.ProxyConfig, bool)
- func (s *Scraper) ScrapeURL(ctx context.Context, rawURL string) (*models.ScraperResult, error)
- func (s *Scraper) Search(ctx context.Context, id string) (*models.ScraperResult, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedLanguages = []string{"en", "ja", "cn", "tw"}
SupportedLanguages lists the language codes supported by JavLibrary. en = English, ja = Japanese, cn = Chinese (Simplified), tw = Chinese (Traditional)
Functions ¶
This section is empty.
Types ¶
type JavLibraryConfig ¶
type JavLibraryConfig struct {
config.BaseScraperConfig `yaml:",inline"`
Language string `yaml:"language" json:"language"`
BaseURL string `yaml:"base_url" json:"base_url"`
Cookies map[string]string `yaml:"cookies,omitempty" json:"cookies,omitempty"`
}
func (*JavLibraryConfig) ValidateConfig ¶
func (c *JavLibraryConfig) ValidateConfig(sc *config.ScraperSettings) error
type Scraper ¶
type Scraper struct {
// contains filtered or unexported fields
}
Scraper implements the models.Scraper interface for JavLibrary
func New ¶
func New(settings config.ScraperSettings, globalProxy *config.ProxyConfig, globalFlareSolverr config.FlareSolverrConfig) *Scraper
New creates a new JavLibrary scraper.
func (*Scraper) CanHandleURL ¶
GetURL returns the search URL for a given ID
func (*Scraper) Config ¶
func (s *Scraper) Config() *config.ScraperSettings
Config returns the scraper's configuration
func (*Scraper) ExtractIDFromURL ¶
func (*Scraper) GetLanguage ¶
GetLanguage returns the configured language
func (*Scraper) ResolveDownloadProxyForHost ¶
func (s *Scraper) ResolveDownloadProxyForHost(host string) (*config.ProxyConfig, *config.ProxyConfig, bool)
ResolveDownloadProxyForHost declares JavLibrary-owned media hosts for downloader proxy routing.
Click to show internal directories.
Click to hide internal directories.