var Markets = []string{ "amer", "apac", "emea", "latam", }
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
type Dash struct { Body []byte Url *url.URL }
type Error struct { Code string Detail string // show was filtered by validator Message string // Token is missing or not valid }
func (e *Error) Error() string
type Included struct { Attributes *struct { SeasonNumber int EpisodeNumber int Name string VideoType string } Relationships *struct { Edit *struct { Data struct { Id string } } } }
func (i *Included) String() string
type Initiate struct { LinkingCode string TargetUrl string }
func FetchInitiate(st *http.Cookie, market string) (*Initiate, error)
func (i *Initiate) String() string
type Login struct { Data struct { Attributes struct { Token string } } }
func FetchLogin(st *http.Cookie) (*Login, error)
you must /authentication/linkDevice/initiate first or this will always fail
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 struct { Errors []Error Included []*Included }
func (p *Page) FilterAndSort()
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 } }
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 struct { LicenseUrl string }