Package mubi (v1.10.6) [up] [repository]

Index

Variables

var ClientCountry = "US"
var Transport = http.Transport{
	Proxy: func(req *http.Request) (*url.URL, error) {
		log.Println(req.Method, req.URL)
		return nil, nil
	},
}

Functions

func FilmId(slug string) (int64, error)
func FilmSlug(address string) (string, error)

https://mubi.com/en/films/perfect-days https://mubi.com/en/us/films/perfect-days https://mubi.com/films/perfect-days https://mubi.com/us/films/perfect-days

Types

type Authenticate

type Authenticate struct {
	Token string
	User  struct {
		Id int
	}
}

Methods

func (a *Authenticate) SecureUrl(filmId int64) (*SecureUrl, error)
func (a *Authenticate) Unmarshal(data AuthenticateData) error
func (a *Authenticate) Viewing(filmId int64) error

to get the MPD you have to call this or view video on the website. request is hard geo blocked only the first time

func (a *Authenticate) Widevine(data []byte) ([]byte, error)

type AuthenticateData

type AuthenticateData []byte

type LinkCode

type LinkCode struct {
	AuthToken string `json:"auth_token"`
	LinkCode  string `json:"link_code"`
}

Methods

func (l *LinkCode) Authenticate() (AuthenticateData, error)
func (l *LinkCode) String() string
func (l *LinkCode) Unmarshal(data LinkCodeData) error

type LinkCodeData

type LinkCodeData []byte

Functions

func FetchLinkCode() (LinkCodeData, error)

type SecureUrl

type SecureUrl struct {
	TextTrackUrls []Text `json:"text_track_urls"`
	Url           string // MPD
	UserMessage   string `json:"user_message"`
}

type Text

type Text struct {
	Id  string
	Url string
}

Methods

func (t *Text) Base() string