Package hboMax (v1.11.1) [up] [repository]

Index

Variables

var Markets = []string{
	"amer",
	"apac",
	"emea",
	"latam",
}

Functions

func FetchSt() (*http.Cookie, error)
func ParseShowId(urlData string) (string, error)

https://hbomax.com/at/en/movies/austin-powers-international-man-of-mystery/a979fb8b-f713-4de3-a625-d16ad4d37448 https://hbomax.com/movies/one-battle-after-another/bebe611d-8178-481a-a4f2-de743b5b135a https://hbomax.com/shows/white-lotus/14f9834d-bc23-41a8-ab61-5c8abdbea505 https://play.hbomax.com/movie/b7b66574-c6e3-4ed3-a266-6bc44180252e https://play.hbomax.com/show/31cb4b84-951a-4daf-8925-746fcdcddcb8

Types

type Dash

type Dash struct {
	Body []byte
	Url  *url.URL
}

type Error

type Error struct {
	Code    string
	Detail  string // show was filtered by validator
	Message string // Token is missing or not valid
}

Methods

func (e *Error) Error() string

type Included

type Included struct {
	Attributes *struct {
		SeasonNumber  int
		EpisodeNumber int
		Name          string
		VideoType     string
	}
	Relationships *struct {
		Edit *struct {
			Data struct {
				Id string
			}
		}
	}
}

Methods

func (i *Included) String() string

type Initiate

type Initiate struct {
	LinkingCode string
	TargetUrl   string
}

Functions

func FetchInitiate(st *http.Cookie, market string) (*Initiate, error)

Methods

func (i *Initiate) String() string

type Login

type Login struct {
	Data struct {
		Attributes struct {
			Token string
		}
	}
}

Functions

func FetchLogin(st *http.Cookie) (*Login, error)

you must /authentication/linkDevice/initiate first or this will always fail

Methods

func (l Login) Movie(showId string) (*Page, error)
func (l *Login) PlayReady(editId string) (*Playback, error)
func (l Login) Season(showId string, number int) (*Page, error)
func (l *Login) Widevine(editId string) (*Playback, error)

type Page

type Page struct {
	Errors   []Error
	Included []*Included
}

Methods

func (p *Page) FilterAndSort()

type Playback

type Playback struct {
	Drm struct {
		Schemes struct {
			PlayReady *Scheme
			Widevine  *Scheme
		}
	}
	Errors   []Error
	Fallback struct {
		Manifest struct {
			Url string // _fallback.mpd:1080p, .mpd:4K
		}
	}
	Manifest struct {
		Url string // 1080p
	}
}

Methods

func (p *Playback) Dash() (*Dash, error)
func (p *Playback) PlayReady(body []byte) ([]byte, error)

1080p SL2000 1440p SL3000

func (p *Playback) Widevine(body []byte) ([]byte, error)

type Scheme

type Scheme struct {
	LicenseUrl string
}