Documentation
¶
Overview ¶
Package hdrezka site parser.
Index ¶
- type Cover
- type CoverItem
- type CoverOption
- type Episodes
- type Filter
- type Genre
- type HDRezka
- func (r *HDRezka) GetCovers(opts CoverOption, maxItems int) ([]*CoverItem, error)
- func (r *HDRezka) GetCoversNewest(genre Genre) ([]*CoverItem, error)
- func (r *HDRezka) GetCoversURL(opts CoverOption) (string, error)
- func (r *HDRezka) GetVideo(videoURL string) (*Video, error)
- func (r *HDRezka) QuickSearch(query string) ([]*CoverItem, error)
- func (r *HDRezka) Search(query string, maxItems int) ([]*CoverItem, error)
- type Person
- type Rating
- type Stream
- type Translation
- type Video
- type VideoFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoverOption ¶
type CoverOption struct { Category string Country string Filter Filter Genre Genre Type Cover Year string }
CoverOption is a struct for cover options
type Episodes ¶
Episodes is a struct for seasons and episodes
func (*Episodes) ListEpisodes ¶
ListEpisodes get list episodes for season.
func (*Episodes) ListSeasons ¶
ListSeasons get list seasons for video.
type HDRezka ¶
type HDRezka struct { // URL is a base url for hdrezka site URL *url.URL // Categories is a map of categories by genre and their urls Categories map[Genre]map[string]string // Years is list of years for filtering Years []string }
HDRezka is a struct for working with hdrezka site
func New ¶
New create new instance of HDRezka mirrors - list of site mirrors, first working will be used
func (*HDRezka) GetCovers ¶
func (r *HDRezka) GetCovers(opts CoverOption, maxItems int) ([]*CoverItem, error)
GetCovers returns video covers with options.
func (*HDRezka) GetCoversNewest ¶
GetCoversNewest returns newest video covers by genres.
func (*HDRezka) GetCoversURL ¶
func (r *HDRezka) GetCoversURL(opts CoverOption) (string, error)
GetCoversURL generate video URL by options.
func (*HDRezka) QuickSearch ¶
QuickSearch simple search for videos by query.
type Stream ¶
type Stream struct { Formats map[string]VideoFormat Subtitles map[string]string Subtitle any `json:"subtitle"` SubtitleDef any `json:"subtitle_def"` Thumbnails string `json:"thumbnails"` URL string `json:"url"` }
Stream is a struct for stream info
type Translation ¶
type Translation struct { Name string `json:"name"` ID string `json:"id"` IsAds bool `json:"is_ads"` IsCamRip bool `json:"is_camrip"` IsDefault bool `json:"is_default"` // contains filtered or unexported fields }
Translation is a struct for translator info
func (*Translation) GetEpisodes ¶
func (t *Translation) GetEpisodes() (Episodes, error)
GetEpisodes get episodes for video.
type Video ¶
type Video struct { Age string `json:"age,omitempty"` Cast []Person `json:"cast,omitempty"` Categories []string `json:"categories,omitempty"` Country []string `json:"country,omitempty"` Cover string `json:"cover,omitempty"` DefaultStream *Stream `json:"default_stream,omitempty"` Description string `json:"description,omitempty"` Director []Person `json:"director,omitempty"` Duration string `json:"duration,omitempty"` ID string `json:"id"` Rating Rating `json:"rating,omitempty"` RatingIMDB Rating `json:"rating_imdb,omitempty"` RatingKinopoisk Rating `json:"rating_kinopoisk,omitempty"` ReleaseDate string `json:"release_date,omitempty"` Quality string `json:"quality,omitempty"` Tagline string `json:"tagline,omitempty"` Title string `json:"title"` TitleOriginal string `json:"title_original,omitempty"` Translation []*Translation `json:"translation,omitempty"` Type Genre `json:"type"` Year string `json:"year,omitempty"` }
Video is a struct for video info
type VideoFormat ¶
VideoFormat of stream