Documentation
¶
Index ¶
- func FetchWithBrowser(url string, timeout int, proxyConfig *config.ProxyConfig) (string, error)
- type JSONLDAggregateRating
- type JSONLDBrand
- type JSONLDOffer
- type JSONLDProduct
- type JSONLDVideoObject
- type Scraper
- func (s *Scraper) GetURL(id string) (string, error)
- func (s *Scraper) IsEnabled() bool
- func (s *Scraper) Name() string
- func (s *Scraper) ResolveContentID(id string) (string, error)
- func (s *Scraper) ResolveDownloadProxyForHost(host string) (*config.ProxyConfig, *config.ProxyConfig, bool)
- func (s *Scraper) Search(id string) (*models.ScraperResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchWithBrowser ¶
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 ¶
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) ResolveContentID ¶
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.
Click to show internal directories.
Click to hide internal directories.