justWatch

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: OSL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

`presentationType` data seems to be incorrect in some cases. For example, JustWatch reports this as SD: fetchtv.com.au/movie/details/19285 when the site itself reports as HD

Index

Constants

This section is empty.

Variables

View Source
var EnUs = Locales{}/* 139 elements not displayed */

2025-11-04

Functions

func GroupAndSortByUrl added in v1.8.2

func GroupAndSortByUrl(offers []EnrichedOffer) ([]string, map[string][]EnrichedOffer)

GroupAndSortByUrl groups offers by URL and sorts the groups. Within each group, offers are sorted by country.

Types

type Content

type Content struct {
	HrefLangTags []HrefLangTag `json:"href_lang_tags"`
}

func (*Content) Fetch

func (c *Content) Fetch(path string) error

type EnrichedOffer

type EnrichedOffer struct {
	Offer  Offer
	Locale *Locale
}

func Deduplicate added in v1.8.1

func Deduplicate(offers []EnrichedOffer) []EnrichedOffer

Deduplicate removes true duplicates where both the Offer and Locale are identical.

func FilterOffers

func FilterOffers(offers []EnrichedOffer, unwantedTypes ...string) []EnrichedOffer

FilterOffers removes offers with unwanted monetization types.

type HrefLangTag

type HrefLangTag struct {
	Href   string // /ar/pelicula/mulholland-drive
	Locale string // es_AR
}

func (*HrefLangTag) Offers

func (h *HrefLangTag) Offers(localeVar *Locale) ([]Offer, error)

type Locale

type Locale struct {
	FullLocale  string
	Country     string
	CountryName string
}

Struct definitions

type Locales

type Locales []Locale

func FetchLocales

func FetchLocales(language string) (Locales, error)

func (Locales) Locale

func (l Locales) Locale(tag *HrefLangTag) (*Locale, bool)

type Offer

type Offer struct {
	ElementCount     int
	MonetizationType string
	StandardWebUrl   string
}

Jump to

Keyboard shortcuts

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