imdb

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractMovieSchema

func ExtractMovieSchema(src io.Reader) (*schema.Movie, error)

Scrapes the json-ld data from an imdb page and loads it into a movie schema object.

func IsTitleID

func IsTitleID(title string) bool

Returns true if title is a formally valid imdb title id

func TitleUrl2CreditsUrl

func TitleUrl2CreditsUrl(title string) (string, error)

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(rawurl string) (*Controller, error)

func (*Controller) DefaultLang added in v0.2.0

func (r *Controller) DefaultLang() *lcconv.LngCntry

Return IMDB's default language (english).

func (*Controller) PreferredLang added in v0.2.0

func (r *Controller) PreferredLang() *lcconv.LngCntry

Return the language chosen by the user.

func (*Controller) Scrape

func (r *Controller) Scrape() (*tags.Movie, error)

func (*Controller) SetOptions

func (r *Controller) SetOptions(flags *cmdline.Flags) error

Parses controller options. Reconfigures the controller after parsing was successful.

type Credits

type Credits struct {
	// contains filtered or unexported fields
}

represents "fullcredits" pages https://www.imdb.com/title/$titleID/fullcredits

func NewCredits

func NewCredits(r io.Reader) (*Credits, error)

func (*Credits) Actors

func (r *Credits) Actors() ([]tags.Actor, error)

func (*Credits) NamesByIDCallback

func (r *Credits) NamesByIDCallback(id string) func() ([]tags.UniLingual, error)

type Keyword added in v0.3.0

type Keyword struct {
	Name  string
	Votes int
}

func ParseKeywordPage added in v0.3.0

func ParseKeywordPage(url string, lang *lcconv.LngCntry) ([]Keyword, error)

type Title

type Title struct {
	// contains filtered or unexported fields
}

represents title pages https://www.imdb.com/title/$titleID/

func NewTitle

func NewTitle(c *Controller, r io.Reader) (*Title, error)

func (*Title) Actors

func (r *Title) Actors() ([]tags.Actor, error)

Scrapes actors and their characters from the title page.

func (*Title) DateReleased added in v0.1.1

func (r *Title) DateReleased() (tags.UniLingual, error)

func (*Title) Directors

func (r *Title) Directors() ([]tags.UniLingual, error)

func (*Title) Genres

func (r *Title) Genres() ([]tags.MultiLingual, error)

func (*Title) LawRating added in v0.1.1

func (r *Title) LawRating() (tags.UniLingual, error)

func (*Title) Synopsis

func (r *Title) Synopsis() ([]tags.MultiLingual, error)

func (*Title) Title

func (r *Title) Title() ([]tags.MultiLingual, error)

func (*Title) Writers

func (r *Title) Writers() ([]tags.UniLingual, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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