Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImdbData ¶
type ImdbData struct { URL string `json:"url,omitempty" db:"url"` Title string `json:"title,omitempty" db:"title"` Year int `json:"year,omitempty" db:"year"` Rating string `json:"rating,omitempty" db:"rating"` Summary string `json:"summary,omitempty" db:"summary"` Poster string `json:"poster,omitempty" db:"poster"` Links []string `json:"-" db:"-"` }
ImdbData contains data from a single page
type Parser ¶
type Parser interface { GetKey() string // Get the unique key GetLinks() []string // Get the list of links Parse(body *io.ReadCloser, url string) (Parser, error) }
Parser is used to implement custom site-specific parsing logic. Each Parser has only 2 rules for the contents of the struct
- It should have some sort of unique string key
- It should collect a slice of links to visit from each page
Click to show internal directories.
Click to hide internal directories.