mgstage

package
v0.1.2-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scraper

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

Scraper implements the MGStage scraper

func New

func New(cfg *config.Config) *Scraper

New creates a new MGStage scraper

Example

ExampleNew demonstrates basic usage

cfg := config.DefaultConfig()
cfg.Scrapers.MGStage.Enabled = true

scraper := New(cfg)

if scraper.IsEnabled() {
	// Use the scraper
	fmt.Println("MGStage scraper is enabled")
}

func (*Scraper) GetURL

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

GetURL attempts to find the URL for a given movie ID using MGStage search

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 MGStage-owned media hosts for downloader proxy routing.

func (*Scraper) ResolveSearchQuery

func (s *Scraper) ResolveSearchQuery(input string) (string, bool)

ResolveSearchQuery normalizes MGStage-specific IDs from free-form input. This is primarily used by batch scraping to preserve 3-digit numeric prefixes (e.g., "259LUXU-1806"), which generic filename matching can strip to "LUXU-1806".

func (*Scraper) Search

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

Search searches for and scrapes metadata for a given movie ID

Jump to

Keyboard shortcuts

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