imdb

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: BSD-2-Clause Imports: 23 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

Types

type Controller

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

func NewController

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

func (*Controller) CreditsURL added in v0.3.6

func (r *Controller) CreditsURL() string

Return the controller's credits page URL.

func (*Controller) DefaultLang added in v0.2.0

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

Return IMDB's default language. At the moment this is hard-coded to english.

func (*Controller) KeywordsURL added in v0.3.6

func (r *Controller) KeywordsURL() string

Return the controller's keywords page URL.

func (*Controller) PreferredLang added in v0.2.0

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

Return the most significant language chosen by the user if one was set. Return the default language otherwise.

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.

func (*Controller) TitleURL added in v0.3.6

func (r *Controller) TitleURL() string

Return the controller's title URL.

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) Directors added in v0.3.5

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

func (*Credits) Producers added in v0.3.5

func (r *Credits) Producers() ([]tags.UniLingual, error)

func (*Credits) Writers added in v0.3.5

func (r *Credits) Writers() ([]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