dmm

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchWithBrowser

func FetchWithBrowser(url string, timeout int, proxyConfig *config.ProxyConfig) (string, error)

FetchWithBrowser fetches a URL using Chrome browser automation with age verification cookies

Types

type JSONLDAggregateRating

type JSONLDAggregateRating struct {
	Type        string  `json:"@type"`
	RatingValue float64 `json:"ratingValue"`
	RatingCount int     `json:"ratingCount"`
}

JSONLDAggregateRating represents the AggregateRating schema

type JSONLDBrand

type JSONLDBrand struct {
	Type string `json:"@type"`
	Name string `json:"name"`
}

JSONLDBrand represents the Brand schema

type JSONLDOffer

type JSONLDOffer struct {
	Type          string  `json:"@type"`
	Availability  string  `json:"availability"`
	PriceCurrency string  `json:"priceCurrency"`
	Price         float64 `json:"price"`
}

JSONLDOffer represents the Offer schema

type JSONLDProduct

type JSONLDProduct struct {
	Context         string                 `json:"@context"`
	Type            string                 `json:"@type"`
	Name            string                 `json:"name"`
	Description     string                 `json:"description"`
	Image           interface{}            `json:"image"` // Can be string or array
	SKU             string                 `json:"sku"`
	Brand           *JSONLDBrand           `json:"brand"`
	SubjectOf       *JSONLDVideoObject     `json:"subjectOf"`
	Offers          *JSONLDOffer           `json:"offers"`
	AggregateRating *JSONLDAggregateRating `json:"aggregateRating"`
}

JSONLDProduct represents the Product schema from JSON-LD

type JSONLDVideoObject

type JSONLDVideoObject struct {
	Type         string   `json:"@type"`
	Name         string   `json:"name"`
	Description  string   `json:"description"`
	ContentURL   string   `json:"contentUrl"`
	ThumbnailURL string   `json:"thumbnailUrl"`
	UploadDate   string   `json:"uploadDate"`
	Genre        []string `json:"genre"`
}

JSONLDVideoObject represents the VideoObject schema

type Scraper

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

Scraper implements the DMM/Fanza scraper

func New

func New(cfg *config.Config, contentIDRepo *database.ContentIDMappingRepository) *Scraper

New creates a new DMM scraper

func (*Scraper) GetURL

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

GetURL attempts to find the URL for a given movie ID using DMM 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) ResolveContentID

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

ResolveContentID attempts to resolve the display ID to an actual DMM content ID by first checking the cache, then scraping DMM search if needed

func (*Scraper) ResolveDownloadProxyForHost

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

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

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