scrape

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFlagOverrides

func ApplyFlagOverrides(cmd *cobra.Command, cfg *config.Config)

ApplyFlagOverrides applies CLI flag overrides to the config. This is extracted for testability (Story 5.4 - Epic 5). Exported to enable comprehensive testing of flag parsing logic.

func NewCommand

func NewCommand() *cobra.Command

func Run

func Run(cmd *cobra.Command, args []string, configFile string, deps *commandutil.Dependencies) (*models.Movie, []*models.ScraperResult, error)

Run executes the scrape command business logic and returns the scraped movie and results. Exported for testing purposes - allows testing business logic without console output. Following Epic 7 pattern from Story 7.1 (API command refactoring).

Parameters:

  • cmd: Cobra command for flag access
  • args: Command arguments (JAV ID at args[0])
  • configFile: Path to configuration file
  • deps: Optional injected dependencies (for testing, pass nil for production use)

Returns:

  • *models.Movie: Scraped and aggregated movie metadata
  • []*models.ScraperResult: Raw results from each scraper source
  • error: Any error encountered during scraping process

Types

This section is empty.

Jump to

Keyboard shortcuts

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