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

Index

Functions

func ParseId(urlData string) string

https://hulu.com/movie/05e76ad8-c3dd-4c3e-bab9-df3cf71c6871 https://hulu.com/movie/alien-romulus-05e76ad8-c3dd-4c3e-bab9-df3cf71c6871

Types

type Dash

type Dash struct {
	Body []byte
	Url  *url.URL
}
type DeepLink struct {
	EabId   string `json:"eab_id"`
	Message string
}

type Device

type Device struct {
	Data struct {
		DeviceToken string `json:"device_token"`
		UserToken   string `json:"user_token"`
	}
}

Functions

func FetchDevice(email, password string) (*Device, error)

Methods

func (d *Device) Playlist(eabId string) (*Playlist, error)

1080p L3, SL2000 1440p SL3000

func (d *Device) TokenRefresh() error

returns user_token only

type Playlist

type Playlist struct {
	DashPrServer string `json:"dash_pr_server"`
	WvServer     string `json:"wv_server"`
	Message      string
	StreamUrl    string `json:"stream_url"` // MPD
}

Methods

func (p *Playlist) Dash() (*Dash, error)
func (p *Playlist) PlayReady(data []byte) ([]byte, error)
func (p *Playlist) Widevine(data []byte) ([]byte, error)