javdb

package
v0.3.4-alpha Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JavDBConfig

type JavDBConfig struct {
	config.BaseScraperConfig `yaml:",inline"`
	BaseURL                  string `yaml:"base_url" json:"base_url"`
}

func (*JavDBConfig) ValidateConfig

func (c *JavDBConfig) ValidateConfig(sc *config.ScraperSettings) error

type Scraper

type Scraper struct {
	// contains filtered or unexported fields
}

Scraper implements the JavDB scraper.

func New

func New(settings config.ScraperSettings, globalProxy *config.ProxyConfig, globalFlareSolverr config.FlareSolverrConfig) *Scraper

New creates a new JavDB scraper.

func (*Scraper) CanHandleURL

func (s *Scraper) CanHandleURL(rawURL string) bool

CanHandleURL returns true if this scraper can handle the given URL

func (*Scraper) Close

func (s *Scraper) Close() error

Close cleans up resources held by the scraper (HTTP client, FlareSolverr).

func (*Scraper) Config

func (s *Scraper) Config() *config.ScraperSettings

Config returns the scraper's configuration

func (*Scraper) ExtractIDFromURL

func (s *Scraper) ExtractIDFromURL(urlStr string) (string, error)

ExtractIDFromURL extracts the movie ID from a JavDB URL

func (*Scraper) GetURL

func (s *Scraper) GetURL(id string) (string, error)

func (*Scraper) IsEnabled

func (s *Scraper) IsEnabled() bool

IsEnabled returns whether the scraper is enabled.

func (*Scraper) Name

func (s *Scraper) Name() string

Name returns the scraper identifier.

func (*Scraper) ResolveDownloadProxyForHost

func (s *Scraper) ResolveDownloadProxyForHost(host string) (*config.ProxyConfig, *config.ProxyConfig, bool)

ResolveDownloadProxyForHost declares JavDB-owned media hosts for downloader proxy routing.

func (*Scraper) ScrapeURL

func (s *Scraper) ScrapeURL(ctx context.Context, urlStr string) (*models.ScraperResult, error)

ScrapeURL directly scrapes metadata from a JavDB URL. This provides more accurate results than ID-based search when the exact URL is known.

func (*Scraper) Search

func (s *Scraper) Search(ctx context.Context, id string) (*models.ScraperResult, error)

Search looks up a movie by ID and scrapes metadata. Search looks up a movie by ID and scrapes metadata with context support.

Jump to

Keyboard shortcuts

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