Documentation
¶
Index ¶
- func NewHTTPClient(cfg *config.ScraperSettings, globalProxy *config.ProxyConfig, ...) (*resty.Client, error)
- type GraphQLRequest
- type GraphQLResponse
- type Image
- type JavstashConfig
- func (c *JavstashConfig) GetDownloadProxy() any
- func (c *JavstashConfig) GetMaxRetries() int
- func (c *JavstashConfig) GetProxy() any
- func (c *JavstashConfig) GetRequestDelay() int
- func (c *JavstashConfig) GetUserAgent() string
- func (c *JavstashConfig) IsEnabled() bool
- func (c *JavstashConfig) ValidateConfig(sc *config.ScraperSettings) error
- type Performer
- type Scene
- 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) GetURL(id string) (string, error)
- func (s *Scraper) IsEnabled() bool
- func (s *Scraper) Name() string
- func (s *Scraper) ScrapeURL(rawURL string) (*models.ScraperResult, error)
- func (s *Scraper) Search(id string) (*models.ScraperResult, error)
- func (s *Scraper) ValidateConfig(cfg *config.ScraperSettings) error
- type Studio
- type Tag
- type URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
func NewHTTPClient(cfg *config.ScraperSettings, globalProxy *config.ProxyConfig, globalFlareSolverr config.FlareSolverrConfig) (*resty.Client, error)
NewHTTPClient creates a new HTTP client for the JavStash scraper. HTTP-01: Per-scraper HTTP client ownership. Uses builder pattern for consistent HTTP client construction.
Types ¶
type GraphQLRequest ¶
type GraphQLResponse ¶
type JavstashConfig ¶
type JavstashConfig struct {
Enabled bool `yaml:"enabled" json:"enabled"`
APIKey string `yaml:"api_key" json:"api_key"`
BaseURL string `yaml:"base_url" json:"base_url"`
Language string `yaml:"language" json:"language"`
RequestDelay int `yaml:"request_delay" json:"request_delay"`
UserAgent string `yaml:"user_agent" json:"user_agent"`
Proxy *config.ProxyConfig `yaml:"proxy,omitempty" json:"proxy,omitempty"`
DownloadProxy *config.ProxyConfig `yaml:"download_proxy,omitempty" json:"download_proxy,omitempty"`
}
func (*JavstashConfig) GetDownloadProxy ¶
func (c *JavstashConfig) GetDownloadProxy() any
func (*JavstashConfig) GetMaxRetries ¶
func (c *JavstashConfig) GetMaxRetries() int
func (*JavstashConfig) GetProxy ¶
func (c *JavstashConfig) GetProxy() any
func (*JavstashConfig) GetRequestDelay ¶
func (c *JavstashConfig) GetRequestDelay() int
func (*JavstashConfig) GetUserAgent ¶
func (c *JavstashConfig) GetUserAgent() string
func (*JavstashConfig) IsEnabled ¶
func (c *JavstashConfig) IsEnabled() bool
func (*JavstashConfig) ValidateConfig ¶
func (c *JavstashConfig) ValidateConfig(sc *config.ScraperSettings) error
type Scene ¶
type Scene struct {
ID string `json:"id"`
Code string `json:"code"`
Title string `json:"title"`
ReleaseDate string `json:"release_date"`
Duration int `json:"duration"`
Director string `json:"director"`
Details string `json:"details"`
Studio *Studio `json:"studio"`
Performers []Performer `json:"performers"`
Tags []Tag `json:"tags"`
Images []Image `json:"images"`
URLs []URL `json:"urls"`
}
type Scraper ¶
type Scraper struct {
// contains filtered or unexported fields
}
func New ¶
func New(settings config.ScraperSettings, globalProxy *config.ProxyConfig, globalFlareSolverr config.FlareSolverrConfig) *Scraper
func (*Scraper) CanHandleURL ¶
func (*Scraper) Config ¶
func (s *Scraper) Config() *config.ScraperSettings
func (*Scraper) ExtractIDFromURL ¶
func (*Scraper) ScrapeURL ¶
func (s *Scraper) ScrapeURL(rawURL string) (*models.ScraperResult, error)
func (*Scraper) ValidateConfig ¶
func (s *Scraper) ValidateConfig(cfg *config.ScraperSettings) error
Click to show internal directories.
Click to hide internal directories.